Patient
Demographics and other administrative information about an individual or animal receiving care or other health-related services.
https://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-patient.html
Canvas supports a number of FHIR extensions on this resource. See the extension attribute below for the full list of supported extension URLs and their value shapes. The birthsex extension is required on create and update.
Patient create
On success, the new Patient’s identifier is returned in the Location header of the response. The patient record can be viewed in Canvas at https://<instance>.canvasmedical.com/patient/<id>.
Most fields populated through this endpoint will display and be editable on the Patient profile page.
Attributes
The FHIR Resource name.
Canvas-supported FHIR extensions on this resource. Each entry has a url identifying the extension, plus either a valueX field or — for compound extensions (race, ethnicity, tribal-affiliation, preferred-pharmacy) — a nested extension array carrying the value. The url is matched as an exact string.
The birthsex extension (http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex) is required on create and update.
Identifies the extension. See the value-field descriptions below for which url pairs with which valueX (or nested extension) shape.
Used by extensions whose value is a single code.
birthsex — required when this extension is included.
| Code | Meaning |
|---|---|
M | Male |
F | Female |
OTH | Other |
UNK | Unknown |
sex
| Code | Meaning |
|---|---|
184115007 | Patient sex unknown |
248152002 | Female |
248153007 | Male |
33791000087105 | Identifies as nonbinary gender |
asked-declined | Asked but declined |
sexual-orientation
| Code | Meaning |
|---|---|
20430005 | Straight or heterosexual |
38628009 | Lesbian, gay or homosexual |
42035005 | Bisexual |
OTH | Something else, please describe |
UNK | Don’t know |
ASKU | Choose not to disclose |
tz-code — any valid timezone code from the FHIR timezone ValueSet, e.g., America/New_York.
Used by free-text extensions:
- clinical-note — displayed under the patient’s name on the clinical chart. - administrative-note — displayed under the patient’s name on the administrative profile.
Used by the business-line extension. The value is the externallyExposableId of the business line in Canvas.
Used by the genderIdentity extension. When this extension is provided, it overrides the root gender field.
Exactly one coding entry is allowed.
Gender identity code.
Used by patient-default-provider (must reference a Practitioner) and patient-default-location (must reference a Location). Both set the default used for eligibility checks.
Reference string in the form Practitioner/{id} or Location/{id}.
Resource type the reference points to.
Used by compound extensions whose value is itself a list of extensions. The shape of each inner entry depends on the outer url:
us-core-race / us-core-ethnicity — one or more inner extensions with url: ombCategory, detailed, or text. For ombCategory / detailed, provide a valueCoding. For text, provide a valueString.
us-core-tribal-affiliation — exactly one inner extension with url: tribalAffiliation and a valueCodeableConcept containing one or more codings (each requires system, code, and display).
preferred-pharmacy — one inner extension with url: ncpdp-id is required; the NCPDP number goes in valueIdentifier.value (must be exactly 7 digits, left-padded with zeros). Optional inner extensions: default (boolean — at most one preferred pharmacy per patient may be set to true), name, phone-number, address, fax-number, specialty_type (each valueString).
Identifies the inner extension. See the parent description above for which value applies to which compound extension.
For race / ethnicity ombCategory and detailed inner extensions.
For known race / ethnicity codes use the OID; for ASKU use the v3-NullFlavor system.
Race or ethnicity code from the CDC Race and Ethnicity CodeSystem. Example race codes — 2131-1 (Other Race), 2106-3 (White). Example ethnicity codes — 2186-5 (Not Hispanic or Latino), 2135-2 (Hispanic or Latino).
For the tribal-affiliation inner extension. Contains a coding list with at least one entry; each coding requires system, code, and display.
Typically http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS.
For the preferred-pharmacy ncpdp-id inner extension.
NCPDP identifier — must be exactly 7 digits, left-padded with zeros if needed.
For the preferred-pharmacy default inner extension. At most one preferred-pharmacy entry per patient may be set to true.
Used in two contexts:
• For the race / ethnicity text inner extension — a free-text representation of the race or ethnicity.
• For the preferred-pharmacy metadata inner extensions (name, phone-number, address, fax-number, specialty_type) — free-text values about the pharmacy.
External identifiers for this patient. None of these identifiers are surfaced on the patient chart, but they may help you correlate the Canvas patient with records in your own systems.
The MRN is auto-issued by Canvas; do not include it on create.
Purpose of this identifier. Defaults to usual if omitted.
Free-text namespace for the value (e.g., “HealthCo”, or a URL).
The identifier value. Must be 1–255 characters.
Validity window for this identifier. End-before-start is not validated.
Inclusive start date (YYYY-MM-DD). Defaults to 1970-01-01 if omitted.
Inclusive end date (YYYY-MM-DD). Defaults to 2100-12-31 if omitted.
Whether the patient is active in the healthcare system. Defaults to true if omitted on create.
One or more names for the patient. At least one entry is required, and exactly one entry must have use: official — that entry determines the patient’s first/middle/last/prefix/suffix shown across the Canvas UI.
Additional entries with use: nickname, maiden, or old are accepted: the first item in the given list of a nickname entry is stored as the patient’s preferred name. maiden and old entries are stored but not displayed in the Canvas UI. Entries with any other use value are ignored.
In the Canvas UI, patients display as first last suffix (nickname), and search supports first, middle, last, suffix, and nickname.
At least one entry with use: official is required. See the parent description for how each accepted value is handled.
Family name (often called ‘Surname’). Required on the official entry to populate the patient’s last name.
Given names. The first item populates the patient’s first name; remaining items are joined with a space and stored as the middle name.
For a nickname entry, only the first item is read and stored as the patient’s preferred name.
Parts that come before the name (e.g., “Dr.”, “Mr.”). Stored but not displayed in the Canvas UI.
Parts that come after the name (e.g., “Jr.”, “III”). Surfaced in the Canvas UI.
Patient contact points (phone / email / fax / etc.).
Phone and email entries are surfaced in the Canvas UI. Other systems are accepted and stored but are not displayed.
Optional flags about the contact point. The has-consent extension records that the patient has consented to receive messages at this contact point — set the url to http://schemas.canvasmedical.com/fhir/extensions/has-consent with valueBoolean: true.
Note: Setting has-consent here does not send a verification email or text as the Canvas UI does — it bypasses verification and marks the contact point as verified.
Telecommunications form. url is stored internally as other, and sms is stored as phone.
The contact point value (phone number, email address, etc.).
Purpose of this contact point. Defaults to home if omitted.
Preferred order across contact points of the same system. Defaults to 1.
Maps to the gender identity field in the Canvas UI. See the administrative gender ValueSet.
unknown displays as “choose not to disclose” on the patient chart. other displays as “Additional gender category or other, please specify”.
Note: If the genderIdentity extension is also provided, it overrides this field.
Patient’s date of birth, formatted YYYY-MM-DD.
Canvas also accepts partial dates: YYYY-MM defaults to the 1st of the month, and YYYY defaults to January 1st.
Date/time the patient died. Mutually exclusive with deceasedBoolean — provide one or the other.
Whether the patient is deceased. Use when an exact date/time isn’t known.
Address(es) for the patient.
Defaults to home if omitted.
Defaults to both if omitted.
First item populates address line 1; remaining items are concatenated as address line 2.
City of the address.
2-letter state abbreviation.
5-digit postal code.
ISO 3166 2-letter country code. Defaults to us.
Validity window for this address.
Inclusive start date.
Inclusive end date.
Patient photo. Displayed as the avatar in the Canvas UI.
Base64-encoded image content. Use on create or update to upload a photo.
Contact parties (e.g., guardian, partner, friend, emergency contact) for the patient. Contact details display on the Patient profile page in the Canvas UI.
Codings describing the relationship of the contact to the patient. Codings can come from the standard v3-RoleCode system or from your instance’s configurable contact categories, including the built-in Emergency contact category (code: EMC). Multiple codings can be combined on a single relationship to capture, e.g., both a familial relationship (SPS = spouse) and a contact-category role (EMC = emergency contact).
Code(s) defined by a terminology system.
The system URL of the coding. Use http://terminology.hl7.org/CodeSystem/v3-RoleCode for relationship-type codings from the PatientRelationshipType ValueSet, or http://schemas.canvasmedical.com/fhir/contact-category for Canvas’s configurable contact categories.
The code of the relationship or contact category.
For the v3-RoleCode system, values come from the PatientRelationshipType ValueSet.
For the contact-category system, values are the codes configured under Contact Categories on your instance — for example, EMC (Emergency contact), ARI (Authorized for release of information), POA (Power of attorney).
Human-readable name of the coding.
A name for the contact.
Canvas only stores name.text. The structured sub-fields (family, given, prefix, suffix) are populated on read only when the contact is itself a Canvas patient, and are derived from that patient’s record — they are not accepted on create or update.
Free-text representation of the contact’s full name. The only name field stored for a non-patient contact.
Contact points for this contact.
Canvas stores at most one phone and one email per contact: the first entry with system: phone is stored as the contact’s phone number, and the first entry with system: email is stored as the email. Entries with any other system value are ignored.
Only phone and email are stored on the contact; other values are ignored.
The contact point value.
For system: phone, the value must be exactly 10 digits with no other characters (no dashes, spaces, or country code). Phone values that don’t match are rejected.
Purpose of this contact point.
Languages used to communicate with the patient.
Defaults to English if omitted. Currently only English is supported.
A language usable for communicating with the patient. See Common Languages (preferred) or AllLanguages.
Exactly one coding entry is allowed.
BCP-47 language code (e.g., en).
Human-readable language name (e.g., English).
Plain-text representation of the language.
Responses
Canvas returns the created resource's id as a UUID within the
location header and a null response body.Errors
Patient read
Path Parameters
Response Payload Attributes
The FHIR Resource name.
Canvas-issued unique identifier (UUID) for this Patient. Also referred to as the patient key in Canvas.
A human-readable narrative summarizing the resource. Generated by Canvas; not accepted on create or update.
Canvas-supported FHIR extensions on this resource. Each entry has a url identifying the extension, plus either a valueX field or — for compound extensions (race, ethnicity, tribal-affiliation, preferred-pharmacy) — a nested extension array carrying the value. The url is matched as an exact string.
The birthsex extension (http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex) is required on create and update.
Identifies the extension. See the value-field descriptions below for which url pairs with which valueX (or nested extension) shape.
Used by extensions whose value is a single code.
birthsex — required when this extension is included.
| Code | Meaning |
|---|---|
M | Male |
F | Female |
OTH | Other |
UNK | Unknown |
sex
| Code | Meaning |
|---|---|
184115007 | Patient sex unknown |
248152002 | Female |
248153007 | Male |
33791000087105 | Identifies as nonbinary gender |
asked-declined | Asked but declined |
sexual-orientation
| Code | Meaning |
|---|---|
20430005 | Straight or heterosexual |
38628009 | Lesbian, gay or homosexual |
42035005 | Bisexual |
OTH | Something else, please describe |
UNK | Don’t know |
ASKU | Choose not to disclose |
tz-code — any valid timezone code from the FHIR timezone ValueSet, e.g., America/New_York.
Used by free-text extensions:
- clinical-note — displayed under the patient’s name on the clinical chart. - administrative-note — displayed under the patient’s name on the administrative profile.
Used by the business-line extension. The value is the externallyExposableId of the business line in Canvas.
Used by the genderIdentity extension. When this extension is provided, it overrides the root gender field.
Exactly one coding entry is allowed.
Gender identity code.
Used by patient-default-provider (must reference a Practitioner) and patient-default-location (must reference a Location). Both set the default used for eligibility checks.
Reference string in the form Practitioner/{id} or Location/{id}.
Resource type the reference points to.
Used by compound extensions whose value is itself a list of extensions. The shape of each inner entry depends on the outer url:
us-core-race / us-core-ethnicity — one or more inner extensions with url: ombCategory, detailed, or text. For ombCategory / detailed, provide a valueCoding. For text, provide a valueString.
us-core-tribal-affiliation — exactly one inner extension with url: tribalAffiliation and a valueCodeableConcept containing one or more codings (each requires system, code, and display).
preferred-pharmacy — one inner extension with url: ncpdp-id is required; the NCPDP number goes in valueIdentifier.value (must be exactly 7 digits, left-padded with zeros). Optional inner extensions: default (boolean — at most one preferred pharmacy per patient may be set to true), name, phone-number, address, fax-number, specialty_type (each valueString).
Identifies the inner extension. See the parent description above for which value applies to which compound extension.
For race / ethnicity ombCategory and detailed inner extensions.
For known race / ethnicity codes use the OID; for ASKU use the v3-NullFlavor system.
Race or ethnicity code from the CDC Race and Ethnicity CodeSystem. Example race codes — 2131-1 (Other Race), 2106-3 (White). Example ethnicity codes — 2186-5 (Not Hispanic or Latino), 2135-2 (Hispanic or Latino).
For the tribal-affiliation inner extension. Contains a coding list with at least one entry; each coding requires system, code, and display.
Typically http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS.
For the preferred-pharmacy ncpdp-id inner extension.
NCPDP identifier — must be exactly 7 digits, left-padded with zeros if needed.
For the preferred-pharmacy default inner extension. At most one preferred-pharmacy entry per patient may be set to true.
Used in two contexts:
• For the race / ethnicity text inner extension — a free-text representation of the race or ethnicity.
• For the preferred-pharmacy metadata inner extensions (name, phone-number, address, fax-number, specialty_type) — free-text values about the pharmacy.
External identifiers for this patient. None of these identifiers are surfaced on the patient chart, but they may help you correlate the Canvas patient with records in your own systems.
The array always includes the Canvas-issued MRN (an entry with system: http://canvasmedical.com and a coded type of MR). Additional entries are external identifiers added through prior create/update calls or via the Patient profile in the Canvas UI.
Canvas-issued identifier for this entry. Include on update to target an existing identifier; omit to create a new one.
Purpose of this identifier. Defaults to usual if omitted.
Free-text namespace for the value (e.g., “HealthCo”, or a URL).
The identifier value. Must be 1–255 characters.
Validity window for this identifier. End-before-start is not validated.
Inclusive start date (YYYY-MM-DD). Defaults to 1970-01-01 if omitted.
Inclusive end date (YYYY-MM-DD). Defaults to 2100-12-31 if omitted.
Whether the patient is active in the healthcare system. Defaults to true if omitted on create.
One or more names for the patient. At least one entry is required, and exactly one entry must have use: official — that entry determines the patient’s first/middle/last/prefix/suffix shown across the Canvas UI.
Additional entries with use: nickname, maiden, or old are accepted: the first item in the given list of a nickname entry is stored as the patient’s preferred name. maiden and old entries are stored but not displayed in the Canvas UI. Entries with any other use value are ignored.
In the Canvas UI, patients display as first last suffix (nickname), and search supports first, middle, last, suffix, and nickname.
At least one entry with use: official is required. See the parent description for how each accepted value is handled.
Family name (often called ‘Surname’). Required on the official entry to populate the patient’s last name.
Given names. The first item populates the patient’s first name; remaining items are joined with a space and stored as the middle name.
For a nickname entry, only the first item is read and stored as the patient’s preferred name.
Parts that come before the name (e.g., “Dr.”, “Mr.”). Stored but not displayed in the Canvas UI.
Parts that come after the name (e.g., “Jr.”, “III”). Surfaced in the Canvas UI.
Patient contact points (phone / email / fax / etc.).
Phone and email entries are surfaced in the Canvas UI. Other systems are accepted and stored but are not displayed.
Canvas-issued identifier for this contact point. Include on update to target an existing entry; omit to create a new one.
Optional flags about the contact point. The has-consent extension records that the patient has consented to receive messages at this contact point — set the url to http://schemas.canvasmedical.com/fhir/extensions/has-consent with valueBoolean: true.
Note: Setting has-consent here does not send a verification email or text as the Canvas UI does — it bypasses verification and marks the contact point as verified.
Telecommunications form. url is stored internally as other, and sms is stored as phone.
The contact point value (phone number, email address, etc.).
Purpose of this contact point. Defaults to home if omitted.
Preferred order across contact points of the same system. Defaults to 1.
Maps to the gender identity field in the Canvas UI. See the administrative gender ValueSet.
unknown displays as “choose not to disclose” on the patient chart. other displays as “Additional gender category or other, please specify”.
Note: If the genderIdentity extension is also provided, it overrides this field.
Patient’s date of birth, formatted YYYY-MM-DD.
Canvas also accepts partial dates: YYYY-MM defaults to the 1st of the month, and YYYY defaults to January 1st.
Date/time the patient died. Mutually exclusive with deceasedBoolean — provide one or the other.
Returned in place of deceasedBoolean when an exact datetime is on file.
Whether the patient is deceased. Use when an exact date/time isn’t known.
Returned in place of deceasedDateTime when no exact datetime is on file.
Address(es) for the patient.
Canvas-issued identifier for this address.
Defaults to home if omitted.
Defaults to both if omitted.
First item populates address line 1; remaining items are concatenated as address line 2.
City of the address.
2-letter state abbreviation.
5-digit postal code.
ISO 3166 2-letter country code. Defaults to us.
Validity window for this address.
Inclusive start date.
Inclusive end date.
Patient photo. Displayed as the avatar in the Canvas UI.
URI where the image can be retrieved. Returned on read/search; requires a Bearer token and returns a redirect to a pre-signed S3 URL. See Accessing Resource Attachment Files.
Contact parties (e.g., guardian, partner, friend, emergency contact) for the patient. Contact details display on the Patient profile page in the Canvas UI.
Canvas-issued identifier for this contact. Include on update to target an existing contact; omit to create a new one.
Codings describing the relationship of the contact to the patient. Codings can come from the standard v3-RoleCode system or from your instance’s configurable contact categories, including the built-in Emergency contact category (code: EMC). Multiple codings can be combined on a single relationship to capture, e.g., both a familial relationship (SPS = spouse) and a contact-category role (EMC = emergency contact).
Code(s) defined by a terminology system.
The system URL of the coding. Use http://terminology.hl7.org/CodeSystem/v3-RoleCode for relationship-type codings from the PatientRelationshipType ValueSet, or http://schemas.canvasmedical.com/fhir/contact-category for Canvas’s configurable contact categories.
The code of the relationship or contact category.
For the v3-RoleCode system, values come from the PatientRelationshipType ValueSet.
For the contact-category system, values are the codes configured under Contact Categories on your instance — for example, EMC (Emergency contact), ARI (Authorized for release of information), POA (Power of attorney).
Human-readable name of the coding.
A name for the contact.
Canvas only stores name.text. The structured sub-fields (family, given, prefix, suffix) are populated on read only when the contact is itself a Canvas patient, and are derived from that patient’s record — they are not accepted on create or update.
Free-text representation of the contact’s full name. The only name field stored for a non-patient contact.
Family name. Populated on read only when the contact is a Canvas patient; derived from that patient’s record.
Given names. Populated on read only when the contact is a Canvas patient.
Parts that come before the name. Populated on read only when the contact is a Canvas patient.
Parts that come after the name. Populated on read only when the contact is a Canvas patient.
Contact points for this contact.
Canvas stores at most one phone and one email per contact: the first entry with system: phone is stored as the contact’s phone number, and the first entry with system: email is stored as the email. Entries with any other system value are ignored.
Only phone and email are stored on the contact; other values are ignored.
The contact point value.
For system: phone, the value must be exactly 10 digits with no other characters (no dashes, spaces, or country code). Phone values that don’t match are rejected.
Purpose of this contact point.
Address where the contact can be reached. Populated on read only when the contact is itself a Canvas patient (the contact’s primary address is surfaced); ignored on create and update.
First item is address line 1; remaining items are concatenated as address line 2.
2-letter state abbreviation.
5-digit postal code.
ISO 3166 2-letter country code.
Languages used to communicate with the patient.
A language usable for communicating with the patient. See Common Languages (preferred) or AllLanguages.
Exactly one coding entry is allowed.
BCP-47 language code (e.g., en).
Human-readable language name (e.g., English).
Plain-text representation of the language.
Responses
Errors
Patient update
How updates and deletions to identifier, telecom, address, and contact are handled:
Each entry returned via Search/Read includes an id.
• If the id is included in an entry, Canvas updates the matching record.
• If the id is omitted, Canvas creates a new record.
• If an entry returned via Search/Read is not included in the update body, it is deleted (with the exception of identifier, which is only deleted when its period.end is in the future).
The same delete-on-omission behavior applies to the preferred-pharmacy, default-provider, and default-location extensions — their values are dropped if those extensions are not present on update.
Other fields
Any field that is required on create is also required on update. Optional fields that are not included in the update body retain their stored values.
Attributes
The FHIR Resource name.
Canvas-issued unique identifier (UUID) for this Patient. Also referred to as the patient key in Canvas.
Must match the ID in the path parameter.
Canvas-supported FHIR extensions on this resource. Each entry has a url identifying the extension, plus either a valueX field or — for compound extensions (race, ethnicity, tribal-affiliation, preferred-pharmacy) — a nested extension array carrying the value. The url is matched as an exact string.
The birthsex extension (http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex) is required on create and update.
Replace semantics on update: the preferred-pharmacy, patient-default-provider, and patient-default-location extensions follow delete-on-omission — if not included in the request, the stored value is dropped.
Identifies the extension. See the value-field descriptions below for which url pairs with which valueX (or nested extension) shape.
Used by extensions whose value is a single code.
birthsex — required when this extension is included.
| Code | Meaning |
|---|---|
M | Male |
F | Female |
OTH | Other |
UNK | Unknown |
sex
| Code | Meaning |
|---|---|
184115007 | Patient sex unknown |
248152002 | Female |
248153007 | Male |
33791000087105 | Identifies as nonbinary gender |
asked-declined | Asked but declined |
sexual-orientation
| Code | Meaning |
|---|---|
20430005 | Straight or heterosexual |
38628009 | Lesbian, gay or homosexual |
42035005 | Bisexual |
OTH | Something else, please describe |
UNK | Don’t know |
ASKU | Choose not to disclose |
tz-code — any valid timezone code from the FHIR timezone ValueSet, e.g., America/New_York.
Used by free-text extensions:
- clinical-note — displayed under the patient’s name on the clinical chart. - administrative-note — displayed under the patient’s name on the administrative profile.
Used by the business-line extension. The value is the externallyExposableId of the business line in Canvas.
Used by the genderIdentity extension. When this extension is provided, it overrides the root gender field.
Exactly one coding entry is allowed.
Gender identity code.
Used by patient-default-provider (must reference a Practitioner) and patient-default-location (must reference a Location). Both set the default used for eligibility checks.
Reference string in the form Practitioner/{id} or Location/{id}.
Resource type the reference points to.
Used by compound extensions whose value is itself a list of extensions. The shape of each inner entry depends on the outer url:
us-core-race / us-core-ethnicity — one or more inner extensions with url: ombCategory, detailed, or text. For ombCategory / detailed, provide a valueCoding. For text, provide a valueString.
us-core-tribal-affiliation — exactly one inner extension with url: tribalAffiliation and a valueCodeableConcept containing one or more codings (each requires system, code, and display).
preferred-pharmacy — one inner extension with url: ncpdp-id is required; the NCPDP number goes in valueIdentifier.value (must be exactly 7 digits, left-padded with zeros). Optional inner extensions: default (boolean — at most one preferred pharmacy per patient may be set to true), name, phone-number, address, fax-number, specialty_type (each valueString).
Identifies the inner extension. See the parent description above for which value applies to which compound extension.
For race / ethnicity ombCategory and detailed inner extensions.
For known race / ethnicity codes use the OID; for ASKU use the v3-NullFlavor system.
Race or ethnicity code from the CDC Race and Ethnicity CodeSystem. Example race codes — 2131-1 (Other Race), 2106-3 (White). Example ethnicity codes — 2186-5 (Not Hispanic or Latino), 2135-2 (Hispanic or Latino).
For the tribal-affiliation inner extension. Contains a coding list with at least one entry; each coding requires system, code, and display.
Typically http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS.
For the preferred-pharmacy ncpdp-id inner extension.
NCPDP identifier — must be exactly 7 digits, left-padded with zeros if needed.
For the preferred-pharmacy default inner extension. At most one preferred-pharmacy entry per patient may be set to true.
Used in two contexts:
• For the race / ethnicity text inner extension — a free-text representation of the race or ethnicity.
• For the preferred-pharmacy metadata inner extensions (name, phone-number, address, fax-number, specialty_type) — free-text values about the pharmacy.
External identifiers for this patient. None of these identifiers are surfaced on the patient chart, but they may help you correlate the Canvas patient with records in your own systems.
The MRN is managed by Canvas — do not modify it.
Replace semantics: Each entry returned via Search/Read includes an id. Include the id to preserve or modify an existing identifier; omit id to add a new one. An identifier already in Canvas that is not included in the update message will be deleted only if its period.end is in the future.
Canvas-issued identifier for this entry. Include on update to target an existing identifier; omit to create a new one.
Purpose of this identifier. Defaults to usual if omitted.
Free-text namespace for the value (e.g., “HealthCo”, or a URL).
The identifier value. Must be 1–255 characters.
Validity window for this identifier. End-before-start is not validated.
Inclusive start date (YYYY-MM-DD). Defaults to 1970-01-01 if omitted.
Inclusive end date (YYYY-MM-DD). Defaults to 2100-12-31 if omitted.
Whether the patient is active in the healthcare system. Defaults to true if omitted on create.
One or more names for the patient. At least one entry is required, and exactly one entry must have use: official — that entry determines the patient’s first/middle/last/prefix/suffix shown across the Canvas UI.
Additional entries with use: nickname, maiden, or old are accepted: the first item in the given list of a nickname entry is stored as the patient’s preferred name. maiden and old entries are stored but not displayed in the Canvas UI. Entries with any other use value are ignored.
In the Canvas UI, patients display as first last suffix (nickname), and search supports first, middle, last, suffix, and nickname.
Replace semantics: Names are not addressed by id — the name array sent in the update replaces the names stored in Canvas (subject to the use-based rules above). To preserve a previously stored name, include it in the update body.
At least one entry with use: official is required. See the parent description for how each accepted value is handled.
Family name (often called ‘Surname’). Required on the official entry to populate the patient’s last name.
Given names. The first item populates the patient’s first name; remaining items are joined with a space and stored as the middle name.
For a nickname entry, only the first item is read and stored as the patient’s preferred name.
Parts that come before the name (e.g., “Dr.”, “Mr.”). Stored but not displayed in the Canvas UI.
Parts that come after the name (e.g., “Jr.”, “III”). Surfaced in the Canvas UI.
Patient contact points (phone / email / fax / etc.).
Phone and email entries are surfaced in the Canvas UI. Other systems are accepted and stored but are not displayed.
Replace semantics: Each entry returned via Search/Read includes an id. Include the id to preserve or modify an existing contact point; omit id to add a new one. A contact point not included in the update message will be deleted.
Canvas-issued identifier for this contact point. Include on update to target an existing entry; omit to create a new one.
Optional flags about the contact point. The has-consent extension records that the patient has consented to receive messages at this contact point — set the url to http://schemas.canvasmedical.com/fhir/extensions/has-consent with valueBoolean: true.
Note: Setting has-consent here does not send a verification email or text as the Canvas UI does — it bypasses verification and marks the contact point as verified.
Telecommunications form. url is stored internally as other, and sms is stored as phone.
The contact point value (phone number, email address, etc.).
Purpose of this contact point. Defaults to home if omitted.
Preferred order across contact points of the same system. Defaults to 1.
Maps to the gender identity field in the Canvas UI. See the administrative gender ValueSet.
unknown displays as “choose not to disclose” on the patient chart. other displays as “Additional gender category or other, please specify”.
Note: If the genderIdentity extension is also provided, it overrides this field.
Patient’s date of birth, formatted YYYY-MM-DD.
Canvas also accepts partial dates: YYYY-MM defaults to the 1st of the month, and YYYY defaults to January 1st.
Date/time the patient died. Mutually exclusive with deceasedBoolean — provide one or the other.
Whether the patient is deceased. Use when an exact date/time isn’t known.
Setting this to false clears the stored datetime of death; setting to true does not modify a previously stored datetime of death.
Address(es) for the patient.
Replace semantics: Each entry returned via Search/Read includes an id. Include the id to preserve or modify an existing address; omit id to add a new one. An address not included in the update message will be deleted.
Canvas-issued identifier for this address.
Defaults to home if omitted.
Defaults to both if omitted.
First item populates address line 1; remaining items are concatenated as address line 2.
City of the address.
2-letter state abbreviation.
5-digit postal code.
ISO 3166 2-letter country code. Defaults to us.
Validity window for this address.
Inclusive start date.
Inclusive end date.
Patient photo. Displayed as the avatar in the Canvas UI.
Base64-encoded image content. Use on create or update to upload a photo.
Contact parties (e.g., guardian, partner, friend, emergency contact) for the patient. Contact details display on the Patient profile page in the Canvas UI.
Replace semantics: Each entry returned via Search/Read includes an id. Include the id to preserve or modify an existing contact; omit id to add a new one. A contact not included in the update message will be deleted.
Canvas-issued identifier for this contact. Include on update to target an existing contact; omit to create a new one.
Codings describing the relationship of the contact to the patient. Codings can come from the standard v3-RoleCode system or from your instance’s configurable contact categories, including the built-in Emergency contact category (code: EMC). Multiple codings can be combined on a single relationship to capture, e.g., both a familial relationship (SPS = spouse) and a contact-category role (EMC = emergency contact).
Code(s) defined by a terminology system.
The system URL of the coding. Use http://terminology.hl7.org/CodeSystem/v3-RoleCode for relationship-type codings from the PatientRelationshipType ValueSet, or http://schemas.canvasmedical.com/fhir/contact-category for Canvas’s configurable contact categories.
The code of the relationship or contact category.
For the v3-RoleCode system, values come from the PatientRelationshipType ValueSet.
For the contact-category system, values are the codes configured under Contact Categories on your instance — for example, EMC (Emergency contact), ARI (Authorized for release of information), POA (Power of attorney).
Human-readable name of the coding.
A name for the contact.
Canvas only stores name.text. The structured sub-fields (family, given, prefix, suffix) are populated on read only when the contact is itself a Canvas patient, and are derived from that patient’s record — they are not accepted on create or update.
Free-text representation of the contact’s full name. The only name field stored for a non-patient contact.
Contact points for this contact.
Canvas stores at most one phone and one email per contact: the first entry with system: phone is stored as the contact’s phone number, and the first entry with system: email is stored as the email. Entries with any other system value are ignored.
Only phone and email are stored on the contact; other values are ignored.
The contact point value.
For system: phone, the value must be exactly 10 digits with no other characters (no dashes, spaces, or country code). Phone values that don’t match are rejected.
Purpose of this contact point.
Languages used to communicate with the patient.
Communication languages cannot currently be modified via this endpoint — the value stored in Canvas is preserved regardless of what’s sent.
A language usable for communicating with the patient. See Common Languages (preferred) or AllLanguages.
Exactly one coding entry is allowed.
BCP-47 language code (e.g., en).
Human-readable language name (e.g., English).
Plain-text representation of the language.
Responses
Canvas returns a
null response body.Errors
Patient search
Search for patient resources.
Query Parameters
Search for patients based on references from other resources using the FHIR reverse-chaining syntax. Currently supported for CareTeam, e.g. _has:CareTeam:participant:member=Practitioner/{practitioner_id}.
A Canvas-issued unique identifier known as the patient key. This can be found in the URL of the patient’s chart.
Sort the results by a specific field. Supported values are _id, birthdate, family, and given. Prefix with - (e.g., -birthdate) to sort in descending order.
By default, both active and inactive patients are returned. Use this parameter to return only active (true) or only inactive (false) patients.
The patient’s birth date.
Patient email address.
Last name.
The gender of the patient.
First name.
The Canvas-issued MRN or a saved identifier from an external system.
Examples:
/Patient?identifier=abc123 — patients with an identifier of “abc123” issued by any system, including Canvas-issued MRNs.
/Patient?identifier=foo|abc123 — patients with an identifier of “abc123” issued by the system named “foo”.
/Patient?identifier=http://canvasmedical.com|012345 — the patient with the Canvas-issued MRN of “012345”.
/Patient?identifier=foo| — all patients with an identifier issued by the system named “foo”.
/Patient?identifier=|abc123 — patients with an identifier of “abc123” issued by the system named “” (empty string).
Part of a first or last name.
Preferred or alternate name.
Patient phone number. Expected to be 10 digits.
Response Payload Attributes
The FHIR Resource name.
This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .
The number of resources that match the search parameter.
Attributes relevant to pagination, see our Pagination page for more detail.
The relation of the page search
The search url for the specific relation
The results bundle that lists out each object returned in the search
The attributes specific to the resource type, see the Attributes section below
Attributes
The FHIR Resource name.
Canvas-issued unique identifier (UUID) for this Patient. Also referred to as the patient key in Canvas.
A human-readable narrative summarizing the resource. Generated by Canvas; not accepted on create or update.
Canvas-supported FHIR extensions on this resource. Each entry has a url identifying the extension, plus either a valueX field or — for compound extensions (race, ethnicity, tribal-affiliation, preferred-pharmacy) — a nested extension array carrying the value. The url is matched as an exact string.
The birthsex extension (http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex) is required on create and update.
Identifies the extension. See the value-field descriptions below for which url pairs with which valueX (or nested extension) shape.
Used by extensions whose value is a single code.
birthsex — required when this extension is included.
| Code | Meaning |
|---|---|
M | Male |
F | Female |
OTH | Other |
UNK | Unknown |
sex
| Code | Meaning |
|---|---|
184115007 | Patient sex unknown |
248152002 | Female |
248153007 | Male |
33791000087105 | Identifies as nonbinary gender |
asked-declined | Asked but declined |
sexual-orientation
| Code | Meaning |
|---|---|
20430005 | Straight or heterosexual |
38628009 | Lesbian, gay or homosexual |
42035005 | Bisexual |
OTH | Something else, please describe |
UNK | Don’t know |
ASKU | Choose not to disclose |
tz-code — any valid timezone code from the FHIR timezone ValueSet, e.g., America/New_York.
Used by free-text extensions:
- clinical-note — displayed under the patient’s name on the clinical chart. - administrative-note — displayed under the patient’s name on the administrative profile.
Used by the business-line extension. The value is the externallyExposableId of the business line in Canvas.
Used by the genderIdentity extension. When this extension is provided, it overrides the root gender field.
Exactly one coding entry is allowed.
Gender identity code.
Used by patient-default-provider (must reference a Practitioner) and patient-default-location (must reference a Location). Both set the default used for eligibility checks.
Reference string in the form Practitioner/{id} or Location/{id}.
Resource type the reference points to.
Used by compound extensions whose value is itself a list of extensions. The shape of each inner entry depends on the outer url:
us-core-race / us-core-ethnicity — one or more inner extensions with url: ombCategory, detailed, or text. For ombCategory / detailed, provide a valueCoding. For text, provide a valueString.
us-core-tribal-affiliation — exactly one inner extension with url: tribalAffiliation and a valueCodeableConcept containing one or more codings (each requires system, code, and display).
preferred-pharmacy — one inner extension with url: ncpdp-id is required; the NCPDP number goes in valueIdentifier.value (must be exactly 7 digits, left-padded with zeros). Optional inner extensions: default (boolean — at most one preferred pharmacy per patient may be set to true), name, phone-number, address, fax-number, specialty_type (each valueString).
Identifies the inner extension. See the parent description above for which value applies to which compound extension.
For race / ethnicity ombCategory and detailed inner extensions.
For known race / ethnicity codes use the OID; for ASKU use the v3-NullFlavor system.
Race or ethnicity code from the CDC Race and Ethnicity CodeSystem. Example race codes — 2131-1 (Other Race), 2106-3 (White). Example ethnicity codes — 2186-5 (Not Hispanic or Latino), 2135-2 (Hispanic or Latino).
For the tribal-affiliation inner extension. Contains a coding list with at least one entry; each coding requires system, code, and display.
Typically http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS.
For the preferred-pharmacy ncpdp-id inner extension.
NCPDP identifier — must be exactly 7 digits, left-padded with zeros if needed.
For the preferred-pharmacy default inner extension. At most one preferred-pharmacy entry per patient may be set to true.
Used in two contexts:
• For the race / ethnicity text inner extension — a free-text representation of the race or ethnicity.
• For the preferred-pharmacy metadata inner extensions (name, phone-number, address, fax-number, specialty_type) — free-text values about the pharmacy.
External identifiers for this patient. None of these identifiers are surfaced on the patient chart, but they may help you correlate the Canvas patient with records in your own systems.
The array always includes the Canvas-issued MRN (an entry with system: http://canvasmedical.com and a coded type of MR). Additional entries are external identifiers added through prior create/update calls or via the Patient profile in the Canvas UI.
Canvas-issued identifier for this entry. Include on update to target an existing identifier; omit to create a new one.
Purpose of this identifier. Defaults to usual if omitted.
Free-text namespace for the value (e.g., “HealthCo”, or a URL).
The identifier value. Must be 1–255 characters.
Validity window for this identifier. End-before-start is not validated.
Inclusive start date (YYYY-MM-DD). Defaults to 1970-01-01 if omitted.
Inclusive end date (YYYY-MM-DD). Defaults to 2100-12-31 if omitted.
Whether the patient is active in the healthcare system. Defaults to true if omitted on create.
One or more names for the patient. At least one entry is required, and exactly one entry must have use: official — that entry determines the patient’s first/middle/last/prefix/suffix shown across the Canvas UI.
Additional entries with use: nickname, maiden, or old are accepted: the first item in the given list of a nickname entry is stored as the patient’s preferred name. maiden and old entries are stored but not displayed in the Canvas UI. Entries with any other use value are ignored.
In the Canvas UI, patients display as first last suffix (nickname), and search supports first, middle, last, suffix, and nickname.
At least one entry with use: official is required. See the parent description for how each accepted value is handled.
Family name (often called ‘Surname’). Required on the official entry to populate the patient’s last name.
Given names. The first item populates the patient’s first name; remaining items are joined with a space and stored as the middle name.
For a nickname entry, only the first item is read and stored as the patient’s preferred name.
Parts that come before the name (e.g., “Dr.”, “Mr.”). Stored but not displayed in the Canvas UI.
Parts that come after the name (e.g., “Jr.”, “III”). Surfaced in the Canvas UI.
Patient contact points (phone / email / fax / etc.).
Phone and email entries are surfaced in the Canvas UI. Other systems are accepted and stored but are not displayed.
Canvas-issued identifier for this contact point. Include on update to target an existing entry; omit to create a new one.
Optional flags about the contact point. The has-consent extension records that the patient has consented to receive messages at this contact point — set the url to http://schemas.canvasmedical.com/fhir/extensions/has-consent with valueBoolean: true.
Note: Setting has-consent here does not send a verification email or text as the Canvas UI does — it bypasses verification and marks the contact point as verified.
Telecommunications form. url is stored internally as other, and sms is stored as phone.
The contact point value (phone number, email address, etc.).
Purpose of this contact point. Defaults to home if omitted.
Preferred order across contact points of the same system. Defaults to 1.
Maps to the gender identity field in the Canvas UI. See the administrative gender ValueSet.
unknown displays as “choose not to disclose” on the patient chart. other displays as “Additional gender category or other, please specify”.
Note: If the genderIdentity extension is also provided, it overrides this field.
Patient’s date of birth, formatted YYYY-MM-DD.
Canvas also accepts partial dates: YYYY-MM defaults to the 1st of the month, and YYYY defaults to January 1st.
Date/time the patient died. Mutually exclusive with deceasedBoolean — provide one or the other.
Returned in place of deceasedBoolean when an exact datetime is on file.
Whether the patient is deceased. Use when an exact date/time isn’t known.
Returned in place of deceasedDateTime when no exact datetime is on file.
Address(es) for the patient.
Canvas-issued identifier for this address.
Defaults to home if omitted.
Defaults to both if omitted.
First item populates address line 1; remaining items are concatenated as address line 2.
City of the address.
2-letter state abbreviation.
5-digit postal code.
ISO 3166 2-letter country code. Defaults to us.
Validity window for this address.
Inclusive start date.
Inclusive end date.
Patient photo. Displayed as the avatar in the Canvas UI.
URI where the image can be retrieved. Returned on read/search; requires a Bearer token and returns a redirect to a pre-signed S3 URL. See Accessing Resource Attachment Files.
Contact parties (e.g., guardian, partner, friend, emergency contact) for the patient. Contact details display on the Patient profile page in the Canvas UI.
Canvas-issued identifier for this contact. Include on update to target an existing contact; omit to create a new one.
Codings describing the relationship of the contact to the patient. Codings can come from the standard v3-RoleCode system or from your instance’s configurable contact categories, including the built-in Emergency contact category (code: EMC). Multiple codings can be combined on a single relationship to capture, e.g., both a familial relationship (SPS = spouse) and a contact-category role (EMC = emergency contact).
Code(s) defined by a terminology system.
The system URL of the coding. Use http://terminology.hl7.org/CodeSystem/v3-RoleCode for relationship-type codings from the PatientRelationshipType ValueSet, or http://schemas.canvasmedical.com/fhir/contact-category for Canvas’s configurable contact categories.
The code of the relationship or contact category.
For the v3-RoleCode system, values come from the PatientRelationshipType ValueSet.
For the contact-category system, values are the codes configured under Contact Categories on your instance — for example, EMC (Emergency contact), ARI (Authorized for release of information), POA (Power of attorney).
Human-readable name of the coding.
A name for the contact.
Canvas only stores name.text. The structured sub-fields (family, given, prefix, suffix) are populated on read only when the contact is itself a Canvas patient, and are derived from that patient’s record — they are not accepted on create or update.
Free-text representation of the contact’s full name. The only name field stored for a non-patient contact.
Family name. Populated on read only when the contact is a Canvas patient; derived from that patient’s record.
Given names. Populated on read only when the contact is a Canvas patient.
Parts that come before the name. Populated on read only when the contact is a Canvas patient.
Parts that come after the name. Populated on read only when the contact is a Canvas patient.
Contact points for this contact.
Canvas stores at most one phone and one email per contact: the first entry with system: phone is stored as the contact’s phone number, and the first entry with system: email is stored as the email. Entries with any other system value are ignored.
Only phone and email are stored on the contact; other values are ignored.
The contact point value.
For system: phone, the value must be exactly 10 digits with no other characters (no dashes, spaces, or country code). Phone values that don’t match are rejected.
Purpose of this contact point.
Address where the contact can be reached. Populated on read only when the contact is itself a Canvas patient (the contact’s primary address is surfaced); ignored on create and update.
First item is address line 1; remaining items are concatenated as address line 2.
2-letter state abbreviation.
5-digit postal code.
ISO 3166 2-letter country code.
Languages used to communicate with the patient.
A language usable for communicating with the patient. See Common Languages (preferred) or AllLanguages.
Exactly one coding entry is allowed.
BCP-47 language code (e.g., en).
Human-readable language name (e.g., English).
Plain-text representation of the language.
Responses
Errors
curl --request POST \ --url 'https://fumage-example.canvasmedical.com/Patient' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "Patient", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex", "valueCode" : "248152002" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "446141000124107", "display": "Identifies as female gender (finding)" } ], "text": "Identifies as female gender (finding)" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/sexual-orientation", "valueCode": "20430005" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy", "extension": [ { "url": "ncpdp-id", "valueIdentifier": { "value": "1123152", "system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber" } } ] }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider", "valueReference": { "reference": "Practitioner/55096fbcdfb240fd8c999c325304de03", "type": "Practitioner" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-location", "valueReference": { "reference": "Location/95b9ac2d-e963-4d7a-b165-7901870f1663", "type": "Location" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2131-1", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation", "extension": [ { "url": "tribalAffiliation", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS", "code": "187", "display": "Paiute-Shoshone Tribe of the Fallon Reservation and Colony, Nevada" } ] } } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/tz-code", "valueCode": "America/New_York" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/clinical-note", "valueString": "I am a clinical caption from a Create message" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/administrative-note", "valueString": "I am an administrative caption from a Create message" } ], "identifier": [ { "use": "usual", "system": "HealthCo", "value": "s07960990" } ], "active": true, "name": [ { "use": "official", "family": "Jones", "given": [ "Samantha", "Ann" ], "prefix": [ "Dr." ], "suffix": [ "Jr." ] }, { "use": "nickname", "given": [ "Sammy" ] } ], "telecom": [ { "system": "phone", "value": "5554320555", "use": "mobile", "rank": 1 }, { "system": "email", "value": "samantha.jones@example.com", "use": "work", "rank": 1 } ], "gender": "female", "birthDate": "1980-11-13", "address": [ { "use": "home", "type": "both", "text": "1234 Main St., Los Angeles, CA 94107", "line": [ "1234 Main St." ], "city": "Los Angeles", "state": "CA", "postalCode": "94107" } ], "photo": [ { "data": "R0lGODlhEwARAPcAAAAAAAAA/+9aAO+1AP/WAP/eAP/eCP/eEP/eGP/nAP/nCP/nEP/nIf/nKf/nUv/nWv/vAP/vCP/vEP/vGP/vIf/vKf/vMf/vOf/vWv/vY//va//vjP/3c//3lP/3nP//tf//vf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAATABEAAAi+AAMIDDCgYMGBCBMSvMCQ4QCFCQcwDBGCA4cLDyEGECDxAoAQHjxwyKhQAMeGIUOSJJjRpIAGDS5wCDly4AALFlYOgHlBwwOSNydM0AmzwYGjBi8IHWoTgQYORg8QIGDAwAKhESI8HIDgwQaRDI1WXXAhK9MBBzZ8/XDxQoUFZC9IiCBh6wEHGz6IbNuwQoSpWxEgyLCXL8O/gAnylNlW6AUEBRIL7Og3KwQIiCXb9HsZQoIEUzUjNEiaNMKAAAA7" } ], "contact": [ { "name": { "text": "Dan Jones" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "SPS", "display": "spouse" } { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "ARI", "display": "Authorized for release of information" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "POA", "display": "Power of attorney" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "EMC", "display": "Emergency contact" } ], } ], "telecom": [ { "system": "email", "value": "danjones@example.com" } ] }, { "name": { "text": "Linda Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "MTH", "display": "mother" } ] } ], "telecom": [ { "system": "phone", "value": "5557327068" } ] }, { "name": { "text": "Jimmy Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "FTH", "display": "father" } ] } ], "telecom": [ { "system": "email", "value": "j.stewart@example.com" } ] } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } } ] } 'import requests url = "https://fumage-example.canvasmedical.com/Patient" headers = { "accept": "application/json", "Authorization": "Bearer <token>", "content-type": "application/json" } payload = { "resourceType": "Patient", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex", "valueCode" : "248152002" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "446141000124107", "display": "Identifies as female gender (finding)" } ], "text": "Identifies as female gender (finding)" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/sexual-orientation", "valueCode": "20430005" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy", "extension": [ { "url": "ncpdp-id", "valueIdentifier": { "value": "1123152", "system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber" } } ] }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider", "valueReference": { "reference": "Practitioner/55096fbcdfb240fd8c999c325304de03", "type": "Practitioner" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-location", "valueReference": { "reference": "Location/95b9ac2d-e963-4d7a-b165-7901870f1663", "type": "Location" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2131-1", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation", "extension": [ { "url": "tribalAffiliation", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS", "code": "187", "display": "Paiute-Shoshone Tribe of the Fallon Reservation and Colony, Nevada" } ] } } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/tz-code", "valueCode": "America/New_York" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/clinical-note", "valueString": "I am a clinical caption from a Create message" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/administrative-note", "valueString": "I am an administrative caption from a Create message" } ], "identifier": [ { "use": "usual", "system": "HealthCo", "value": "s07960990" } ], "active": True, "name": [ { "use": "official", "family": "Jones", "given": [ "Samantha", "Ann" ] }, { "use": "nickname", "given": [ "Sammy" ] } ], "telecom": [ { "system": "phone", "value": "5554320555", "use": "mobile", "rank": 1 }, { "system": "email", "value": "samantha.jones@example.com", "use": "work", "rank": 1 } ], "gender": "female", "birthDate": "1980-11-13", "address": [ { "use": "home", "type": "both", "text": "1234 Main St., Los Angeles, CA 94107", "line": [ "1234 Main St." ], "city": "Los Angeles", "state": "CA", "postalCode": "94107" } ], "photo": [ { "data": "R0lGODlhEwARAPcAAAAAAAAA/+9aAO+1AP/WAP/eAP/eCP/eEP/eGP/nAP/nCP/nEP/nIf/nKf/nUv/nWv/vAP/vCP/vEP/vGP/vIf/vKf/vMf/vOf/vWv/vY//va//vjP/3c//3lP/3nP//tf//vf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAATABEAAAi+AAMIDDCgYMGBCBMSvMCQ4QCFCQcwDBGCA4cLDyEGECDxAoAQHjxwyKhQAMeGIUOSJJjRpIAGDS5wCDly4AALFlYOgHlBwwOSNydM0AmzwYGjBi8IHWoTgQYORg8QIGDAwAKhESI8HIDgwQaRDI1WXXAhK9MBBzZ8/XDxQoUFZC9IiCBh6wEHGz6IbNuwQoSpWxEgyLCXL8O/gAnylNlW6AUEBRIL7Og3KwQIiCXb9HsZQoIEUzUjNEiaNMKAAAA7" } ], "contact": [ { "name": { "text": "Dan Jones" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "SPS", "display": "spouse" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "ARI", "display": "Authorized for release of information" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "POA", "display": "Power of attorney" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "EMC", "display": "Emergency contact" } ] } ], "telecom": [ { "system": "email", "value": "danjones@example.com" } ] }, { "name": { "text": "Linda Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "MTH", "display": "mother" } ] } ], "telecom": [ { "system": "phone", "value": "5557327068" } ] }, { "name": { "text": "Jimmy Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "FTH", "display": "father" } ] } ], "telecom": [ { "system": "email", "value": "j.stewart@example.com" } ] } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } } ] } response = requests.post(url, json=payload, headers=headers) print(response.text)
null{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "invalid", "details": { "text": "Bad request" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-supported", "details": { "text": "Operation is not supported" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "business-rule", "details": { "text": "Unprocessable entity" } } ] }
curl --request GET \ --url 'https://fumage-example.canvasmedical.com/Patient/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'import requests url = "https://fumage-example.canvasmedical.com/Patient/<id>" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "Patient", "id": "7162fd82487e4dc8aa2581ddbca91892", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Samantha<b>Jones</b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>963277285</td></tr><tr><td>Date of birth</td><td><span>1980-11-13</span></td></tr></tbody></table></div>" }, "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex", "valueCode" : "248152002" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "446141000124107", "display": "Identifies as female gender (finding)" } ], "text": "Identifies as female gender (finding)" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/sexual-orientation", "valueCode": "20430005" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2131-1", "display": "Other Race" } }, { "url": "text", "valueString": "Other Race" } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2186-5", "display": "Not Hispanic or Latino" } }, { "url": "text", "valueString": "Not Hispanic or Latino" } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation", "extension": [ { "url": "tribalAffiliation", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS", "code": "187", "display": "Paiute-Shoshone Tribe of the Fallon Reservation and Colony, Nevada" } ] } } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/tz-code", "valueCode": "America/New_York" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/clinical-note", "valueString": "I am a clinical caption from a Create message" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/administrative-note", "valueString": "I am an administrative caption from a Create message" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy", "extension": [ { "url": "ncpdp-id", "valueIdentifier": { "system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber", "value": "1123152" } }, { "url": "specialty_type", "valueString": "Retail" }, { "url": "default", "valueBoolean": false } ] }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider", "valueReference": { "reference": "Practitioner/55096fbcdfb240fd8c999c325304de03", "type": "Practitioner", "display": "Steven Magee" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-location", "valueReference": { "reference": "Location/95b9ac2d-e963-4d7a-b165-7901870f1663", "type": "Location", "display": "Canvas Clinic San Francisco" } } ], "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "http://canvasmedical.com", "value": "963277285", "assigner": { "display": "Canvas Medical" } }, { "id": "1e628d77-5cdd-400f-a239-b24929d4a0aa", "use": "usual", "system": "HealthCo", "value": "s07960990", "period": { "start": "1970-01-01", "end": "2100-12-31" } } ], "active": true, "name": [ { "use": "official", "family": "Jones", "given": [ "Samantha", "Ann" ], "period": { "start": "0001-01-01T00:00:00+00:00", "end": "9999-12-31T23:59:59.999999+00:00" } }, { "use": "nickname", "given": [ "Sammy" ], "period": { "start": "0001-01-01T00:00:00+00:00", "end": "9999-12-31T23:59:59.999999+00:00" } } ], "telecom": [ { "id": "aa0d6ad0-0b69-4740-9c8c-759c769a63d1", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/has-consent", "valueBoolean": false } ], "system": "phone", "value": "5554320555", "use": "mobile", "rank": 1 }, { "id": "49c0c29d-c56e-41bb-89ab-79562bb75afc", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/has-consent", "valueBoolean": false } ], "system": "email", "value": "samantha.jones@example.com", "use": "work", "rank": 1 } ], "gender": "female", "birthDate": "1980-11-13", "deceasedBoolean": false, "address": [ { "id": "611aaf01-a515-4d55-b43d-88b8735359f7", "use": "home", "type": "both", "line": [ "1234 Main St." ], "city": "Los Angeles", "state": "CA", "postalCode": "94107", "country": "United States" } ], "photo": [ { "url": "https://fumage-example.canvasmedical.com/Patient/7162fd82487e4dc8aa2581ddbca91892/files/photo" } ], "contact": [ { "id": "1ba81cb4-7f97-429d-b0d8-4c4f067b11a5", "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "SPS", "display": "spouse" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "ARI", "display": "Authorized for release of information" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "POA", "display": "Power of attorney" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "EMC", "display": "Emergency contact" } ], } ], "name": { "text": "Dan Jones" }, "telecom": [ { "system": "email", "value": "danjones@example.com" } ] }, { "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3", "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "MTH", "display": "mother" } ] } ], "name": { "text": "Linda Stewart" }, "telecom": [ { "system": "phone", "value": "5557327068" } ] }, { "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb", "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "FTH", "display": "father" } ] } ], "name": { "text": "Jimmy Stewart" }, "telecom": [ { "system": "email", "value": "j.stewart@example.com" } ] } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "details": { "text": "Unknown Patient resource 'a47c7b0ebbb442cdbc4adf259d148ea1'" } } ] }
curl --request PUT \ --url 'https://fumage-example.canvasmedical.com/Patient/<id>' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --data ' { "resourceType": "Patient", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex", "valueCode" : "248152002" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "446141000124107", "display": "Identifies as female gender (finding)" } ], "text": "Identifies as female gender (finding)" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/sexual-orientation", "valueCode": "20430005" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy", "extension": [ { "url": "ncpdp-id", "valueIdentifier": { "value": "1123152", "system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber" } } ] }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider", "valueReference": { "reference": "Practitioner/55096fbcdfb240fd8c999c325304de03", "type": "Practitioner" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-location", "valueReference": { "reference": "Location/95b9ac2d-e963-4d7a-b165-7901870f1663", "type": "Location" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2131-1", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation", "extension": [ { "url": "tribalAffiliation", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS", "code": "187", "display": "Paiute-Shoshone Tribe of the Fallon Reservation and Colony, Nevada" } ] } } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/tz-code", "valueCode": "America/New_York" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/clinical-note", "valueString": "Prefers to be called Sammy" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/administrative-note", "valueString": "I am an administrative caption from a Create message" } ], "identifier": [ { "use": "usual", "system": "HealthCo", "value": "s07960990" } ], "active": true, "name": [ { "use": "official", "family": "Jones", "given": [ "Samantha", "Ann" ], "prefix": [ "Dr." ], "suffix": [ "Jr." ] }, { "use": "nickname", "given": [ "Sammy" ] } ], "telecom": [ { "system": "phone", "value": "5554320555", "use": "mobile", "rank": 1 }, { "system": "email", "value": "samantha.jones@example.com", "use": "work", "rank": 1 } ], "gender": "female", "birthDate": "1980-11-13", "address": [ { "use": "home", "type": "both", "text": "1234 Main St., Los Angeles, CA 94107", "line": [ "1234 Main St." ], "city": "Los Angeles", "state": "CA", "postalCode": "94107" } ], "photo": [ { "data": "R0lGODlhEwARAPcAAAAAAAAA/+9aAO+1AP/WAP/eAP/eCP/eEP/eGP/nAP/nCP/nEP/nIf/nKf/nUv/nWv/vAP/vCP/vEP/vGP/vIf/vKf/vMf/vOf/vWv/vY//va//vjP/3c//3lP/3nP//tf//vf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAATABEAAAi+AAMIDDCgYMGBCBMSvMCQ4QCFCQcwDBGCA4cLDyEGECDxAoAQHjxwyKhQAMeGIUOSJJjRpIAGDS5wCDly4AALFlYOgHlBwwOSNydM0AmzwYGjBi8IHWoTgQYORg8QIGDAwAKhESI8HIDgwQaRDI1WXXAhK9MBBzZ8/XDxQoUFZC9IiCBh6wEHGz6IbNuwQoSpWxEgyLCXL8O/gAnylNlW6AUEBRIL7Og3KwQIiCXb9HsZQoIEUzUjNEiaNMKAAAA7" } ], "contact": [ { "id": "1ba81cb4-7f97-429d-b0d8-4c4f067b11a5", "name": { "text": "Dan Jones" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "SPS", "display": "spouse" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "ARI", "display": "Authorized for release of information" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "POA", "display": "Power of attorney" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "EMC", "display": "Emergency contact" } ] } ], "telecom": [ { "system": "email", "value": "danjones@example.com" } ] }, { "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3", "name": { "text": "Linda Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "MTH", "display": "mother" } ] } ], "telecom": [ { "system": "phone", "value": "5557327068" } ] }, { "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb", "name": { "text": "Jimmy Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "FTH", "display": "father" } ] } ], "telecom": [ { "system": "email", "value": "j.stewart@example.com" } ] } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } } ] } 'import requests url = "https://fumage-example.canvasmedical.com/Patient/<id>" headers = { "accept": "application/json", "Authorization": "Bearer <token>", "content-type": "application/json" } payload = { "resourceType": "Patient", "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex", "valueCode" : "248152002" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "446141000124107", "display": "Identifies as female gender (finding)" } ], "text": "Identifies as female gender (finding)" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy", "extension": [ { "url": "ncpdp-id", "valueIdentifier": { "value": "1123152", "system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber" } } ] }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider", "valueReference": { "reference": "Practitioner/55096fbcdfb240fd8c999c325304de03", "type": "Practitioner" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-location", "valueReference": { "reference": "Location/95b9ac2d-e963-4d7a-b165-7901870f1663", "type": "Location" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2131-1", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [ { "url": "ombCategory", "valueCoding": { "code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238" } } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation", "extension": [ { "url": "tribalAffiliation", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS", "code": "187", "display": "Paiute-Shoshone Tribe of the Fallon Reservation and Colony, Nevada" } ] } } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/tz-code", "valueCode": "America/New_York" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/clinical-note", "valueString": "Prefers to be called Sammy" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/administrative-note", "valueString": "I am an administrative caption from a Create message" } ], "identifier": [ { "use": "usual", "system": "HealthCo", "value": "s07960990" } ], "active": True, "name": [ { "use": "official", "family": "Jones", "given": [ "Samantha", "Ann" ], "prefix": [ "Dr." ], "suffix": [ "Jr." ] }, { "use": "nickname", "given": [ "Sammy" ] } ], "telecom": [ { "system": "phone", "value": "5554320555", "use": "mobile", "rank": 1 }, { "system": "email", "value": "samantha.jones@example.com", "use": "work", "rank": 1 } ], "gender": "female", "birthDate": "1980-11-13", "address": [ { "use": "home", "type": "both", "text": "1234 Main St., Los Angeles, CA 94107", "line": [ "1234 Main St." ], "city": "Los Angeles", "state": "CA", "postalCode": "94107" } ], "photo": [ { "data": "R0lGODlhEwARAPcAAAAAAAAA/+9aAO+1AP/WAP/eAP/eCP/eEP/eGP/nAP/nCP/nEP/nIf/nKf/nUv/nWv/vAP/vCP/vEP/vGP/vIf/vKf/vMf/vOf/vWv/vY//va//vjP/3c//3lP/3nP//tf//vf///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAEALAAAAAATABEAAAi+AAMIDDCgYMGBCBMSvMCQ4QCFCQcwDBGCA4cLDyEGECDxAoAQHjxwyKhQAMeGIUOSJJjRpIAGDS5wCDly4AALFlYOgHlBwwOSNydM0AmzwYGjBi8IHWoTgQYORg8QIGDAwAKhESI8HIDgwQaRDI1WXXAhK9MBBzZ8/XDxQoUFZC9IiCBh6wEHGz6IbNuwQoSpWxEgyLCXL8O/gAnylNlW6AUEBRIL7Og3KwQIiCXb9HsZQoIEUzUjNEiaNMKAAAA7" } ], "contact": [ { "id": "1ba81cb4-7f97-429d-b0d8-4c4f067b11a5", "name": { "text": "Dan Jones" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "SPS", "display": "spouse" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "ARI", "display": "Authorized for release of information" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "POA", "display": "Power of attorney" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "EMC", "display": "Emergency contact" } ], } ], "telecom": [ { "system": "email", "value": "danjones@example.com" } ] }, { "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3", "name": { "text": "Linda Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "MTH", "display": "mother" } ] } ], "telecom": [ { "system": "phone", "value": "5557327068" } ] }, { "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb", "name": { "text": "Jimmy Stewart" }, "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "FTH", "display": "father" } ] } ], "telecom": [ { "system": "email", "value": "j.stewart@example.com" } ] } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } } ] } response = requests.put(url, json=payload, headers=headers) print(response.text)
null{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "invalid", "details": { "text": "Bad request" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-found", "details": { "text": "Unknown Patient resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "not-supported", "details": { "text": "Operation is not supported" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "conflict", "details": { "text": "Resource updated since If-Unmodified-Since date" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "business-rule", "details": { "text": "Unprocessable entity" } } ] }
curl --request GET \ --url 'https://fumage-example.canvasmedical.com/Patient?family=Jones&gender=female' \ --header 'Authorization: Bearer <token>' \ --header 'accept: application/json'import requests url = "https://fumage-example.canvasmedical.com/Patient?family=Jones&gender=female" headers = { "accept": "application/json", "Authorization": "Bearer <token>" } response = requests.get(url, headers=headers) print(response.text)
{ "resourceType": "Bundle", "type": "searchset", "total": 1, "link": [ { "relation": "self", "url": "/Patient?family=Jones&gender=female&_count=10&_offset=0" }, { "relation": "first", "url": "/Patient?family=Jones&gender=female&_count=10&_offset=0" }, { "relation": "last", "url": "/Patient?family=Jones&gender=female&_count=10&_offset=0" } ], "entry": [ { "resource": { "resourceType": "Patient", "id": "7162fd82487e4dc8aa2581ddbca91892", "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Samantha<b>Jones</b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>963277285</td></tr><tr><td>Date of birth</td><td><span>1980-11-13</span></td></tr></tbody></table></div>" }, "extension": [ { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-sex", "valueCode" : "248152002" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "446141000124107", "display": "Identifies as female gender (finding)" } ], "text": "Identifies as female gender (finding)" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/sexual-orientation", "valueCode": "20430005" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2131-1", "display": "Other Race" } }, { "url": "text", "valueString": "Other Race" } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2186-5", "display": "Not Hispanic or Latino" } }, { "url": "text", "valueString": "Not Hispanic or Latino" } ] }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-tribal-affiliation", "extension": [ { "url": "tribalAffiliation", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-TribalEntityUS", "code": "187", "display": "Paiute-Shoshone Tribe of the Fallon Reservation and Colony, Nevada" } ] } } ] }, { "url": "http://hl7.org/fhir/StructureDefinition/tz-code", "valueCode": "America/New_York" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/clinical-note", "valueString": "I am a clinical caption from a Create message" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/administrative-note", "valueString": "I am an administrative caption from a Create message" }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy", "extension": [ { "url": "ncpdp-id", "valueIdentifier": { "system": "http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber", "value": "1123152" } }, { "url": "specialty_type", "valueString": "Retail" }, { "url": "default", "valueBoolean": false } ] }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider", "valueReference": { "reference": "Practitioner/55096fbcdfb240fd8c999c325304de03", "type": "Practitioner", "display": "Steven Magee" } }, { "url": "http://schemas.canvasmedical.com/fhir/extensions/patient-default-location", "valueReference": { "reference": "Location/95b9ac2d-e963-4d7a-b165-7901870f1663", "type": "Location", "display": "Canvas Clinic San Francisco" } } ], "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "http://canvasmedical.com", "value": "963277285", "assigner": { "display": "Canvas Medical" } }, { "id": "1e628d77-5cdd-400f-a239-b24929d4a0aa", "use": "usual", "system": "HealthCo", "value": "s07960990", "period": { "start": "1970-01-01", "end": "2100-12-31" } } ], "active": true, "name": [ { "use": "official", "family": "Jones", "given": [ "Samantha", "Ann" ], "period": { "start": "0001-01-01T00:00:00+00:00", "end": "9999-12-31T23:59:59.999999+00:00" } }, { "use": "nickname", "given": [ "Sammy" ], "period": { "start": "0001-01-01T00:00:00+00:00", "end": "9999-12-31T23:59:59.999999+00:00" } } ], "telecom": [ { "id": "aa0d6ad0-0b69-4740-9c8c-759c769a63d1", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/has-consent", "valueBoolean": false } ], "system": "phone", "value": "5554320555", "use": "mobile", "rank": 1 }, { "id": "49c0c29d-c56e-41bb-89ab-79562bb75afc", "extension": [ { "url": "http://schemas.canvasmedical.com/fhir/extensions/has-consent", "valueBoolean": false } ], "system": "email", "value": "samantha.jones@example.com", "use": "work", "rank": 1 } ], "gender": "female", "birthDate": "1980-11-13", "deceasedBoolean": false, "address": [ { "id": "611aaf01-a515-4d55-b43d-88b8735359f7", "use": "home", "type": "both", "line": [ "1234 Main St." ], "city": "Los Angeles", "state": "CA", "postalCode": "94107", "country": "United States" } ], "contact": [ { "id": "1ba81cb4-7f97-429d-b0d8-4c4f067b11a5", "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "SPS", "display": "spouse" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "ARI", "display": "Authorized for release of information" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "POA", "display": "Power of attorney" }, { "system": "http://schemas.canvasmedical.com/fhir/contact-category", "code": "EMC", "display": "Emergency contact" } ] } ], "name": { "text": "Dan Jones" }, "telecom": [ { "system": "email", "value": "danjones@example.com" } ] }, { "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3" "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "MTH", "display": "mother" } ] } ], "name": { "text": "Linda Stewart" }, "telecom": [ { "system": "phone", "value": "5557327068" } ] }, { "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb", "relationship": [ { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code": "FTH", "display": "father" } ] } ], "name": { "text": "Jimmy Stewart" }, "telecom": [ { "system": "email", "value": "j.stewart@example.com" } ] } ], "communication": [ { "language": { "coding": [ { "system": "urn:ietf:bcp:47", "code": "en", "display": "English" } ], "text": "English" } } ] } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "invalid", "details": { "text": "Bad request" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "unknown", "details": { "text": "Authentication failed" } } ] }{ "resourceType": "OperationOutcome", "issue": [ { "severity": "error", "code": "forbidden", "details": { "text": "Authorization failed" } } ] }