Patient

Demographics and other administrative information about an individual or animal receiving care or other health-related services.

http://hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-patient.html

Supported Extensions

Canvas supports specific FHIR extensions on this resource. In order to identify which extension maps to specific fields in Canvas, the url field is used as an exact string match. Extensions are all json types and should be included in the extension array field as shown in the request/response examples on this page. The following extensions are supported:

birthsex

http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex

A code classifying the person’s sex assigned at birth as specified by the Office of the National Coordinator for Health IT (ONC). This extension aligns with the C-CDA Birth Sex Observation (LOINC 76689-9). After version 6.0.0, this extension is no longer a USCDI Requirement.

Supported values are:

valuedescription
MMale
FFemale
OTHOther
UNKUnknown

genderIdentity

http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity

This extension provides concepts to describe the gender a person identifies as.

Please note that if this extension is included, it will override the root gender field. Supported values are:

valuedescription
446151000124109Identifies as Male
446141000124107Identifies as Female
407377005Female-to-Male (FTM)/Transgender Male/Trans Man
407376001Male-to-Female (MTF)/Transgender Female/Trans Woman
446131000124102Genderqueer, neither exclusively male nor female
OTHAdditional gender category or other, please specify
ASKUChoose not to disclose

sexual-orientation

http://schemas.canvasmedical.com/fhir/extensions/sexual-orientation

Sexual orientation of the patient. Supported values are:

valuedescription
20430005Straight or heterosexual
38628009Lesbian, gay or homosexual
42035005Bisexual
OTHSomething else, please describe
UNKDon’t Know
ASKUChoose not to disclose

race

http://hl7.org/fhir/us/core/StructureDefinition/us-core-race

An extension to specify the races of a patient.

For create and update actions, the url attribute must equal http://hl7.org/fhir/us/core/StructureDefinition/us-core-race. Additionally, a list of objects where each object contains a valueCoding object with the value urn:oid:2.16.840.1.113883.6.238 and the appropriate code of each race needed from the ValueSet.

ethnicity

http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity

An extension to specify the ethnicities of a patient.

For create and update actions, the url attribute must equal http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity. Additionally, a list of objects where each object contains a valueCoding object with the value urn:oid:2.16.840.1.113883.6.238 and the appropriate code of each race needed from the ValueSet.

timezone

http://hl7.org/fhir/StructureDefinition/tz-code

The timezone a patient lives in.

For create and update actions, the url attribute must equal http://hl7.org/fhir/StructureDefinition/tz-code, and the valueCode can contain any valid timezone code defined here.

clinical-note

http://schemas.canvasmedical.com/fhir/extensions/clinical-note

This note displays under the patient’s name in the clinical chart.

For create and update actions, the url attribute must equal http://schemas.canvasmedical.com/fhir/extensions/clinical-note. The valueString attribute is a free text field.

administrative-note

http://schemas.canvasmedical.com/fhir/extensions/administrative-note

This note displays under the patient’s name in the administrative profile.

For create and update actions, the url attribute must equal http://schemas.canvasmedical.com/fhir/extensions/administrative-note. The valueString attribute is a free text field.

preferred-pharmacy

http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy

A patient can have multiple preferred pharmacies added to their profile.

For create and update actions, the url attribute must be equal to http://schemas.canvasmedical.com/fhir/extensions/preferred-pharmacy. For each object in extension, a url attribute with the value ncpdp-id should be included along with a valueIdentifier object including the NCPDP number of the pharmacy under value and the url http://terminology.hl7.org/CodeSystem/NCPDPProviderIdentificationNumber under system.

default-provider

http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider

This extension determines the default Provider (Practitioner) for the Patient that is used for eligibility checks.

For create and update actions, the url attribute must be equal to http://schemas.canvasmedical.com/fhir/extensions/patient-default-provider. The valueReference is a JSON object that contains the required reference attribute pointing to the respective reference Canvas resource, in this case, the Practitioner resource.

default-location

http://schemas.canvasmedical.com/fhir/extensions/patient-default-location

This extension determines the default Provider (Practitioner) for the Patient that is used for eligibility checks.

For create and update actions, the url attribute must be equal to http://schemas.canvasmedical.com/fhir/extensions/patient-default-location. The valueReference is a JSON object that contains the required reference attribute pointing to the respective reference Canvas resource, in this case, the Location resource.

business-line

http://schemas.canvasmedical.com/fhir/extensions/business-line

The business line that the patient belongs to.

Not all Canvas instances have Business Line functionality enabled. See here for information on Business Lines.

If using business line functionality, create and update actions should include a json object with the url attribute equal to http://schemas.canvasmedical.com/fhir/extensions/business-line and the valueId set to the externallyExposableId of the business line in Canvas.

post
/Patient

Patient create

Upon successful creation, the Patient identifier can be found in the Location header of the response. The patient record in Canvas can be viewed at https://<instance>.canvasmedical.com/patient/<id>.

Most of the fields that are populated through this endpoint will display and be editable on the Patient profile page.

Attributes

id
string

Unique Canvas identifier for this resource

text
json

A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource.

extension
array[json]

Reference the information at the top of this page to see the possible extensions contained in this resource. Please note that the birthsex extension is required.

identifier
array[json]

The identifier list defines additional identifiers that are able to be stored for a patient. None of these identifiers will be surfaced on the Patient’s chart but may help you to identify the patient in your internal system.

Click to view child attributes
use
string

Supported values are usual, official, temp, secondary and old. If omittted, the default value is usual.

system
string

Free text field to identify what this value represents.

value
string

Free text field to store the patient’s identifier.

period
date

This is used to specify the start and end dates (format YYYY-MM-DD). If period is omitted it will default to start = 1970-01-01 and end = 2100-12-31. There is currently no validation if the end date is before the start date.

active
boolean

A boolean to specify if the patient is active in the healthcare system. If this value is not set, Canvas will default this to true.

name
array[json] required

The identifier of the patient. Name is a required list of objects.

One iteration must be marked with use: official. The first object with use: official will determine the patient’s first, last, prefix, suffix or middle name. The first and last name is required within Canvas. For example:

• the family attribute will populate the patient’s last name.
• the given list will populate the patient’s first/middle name. The first item in the list will be the first name, while if more items in the list exists, it will populate the patient’s middle name and be joined together with an empty space.
• the prefix attribute will be stored within Canvas’s database but will not be displayed in the Canvas UI.
• the suffix attribute will be displayed on the Canvas UI but it will not be editable through the UI.

The example also demonstrates that Canvas ingests a nickname (preferred name) for the Patient. This element is identified by use = nickname and the first item in the given list will be the Patient’s nickname. Canvas can also ingest old names or maiden names using use: maiden or use: old. These will not show up on the Canvas UI but will be stored by Canvas and will be returned via a read request.

In the Canvas UI, each patient will be displayed as first-last-suffix (nickname). Searches can be performed using first, middle, last, suffix or nickname.

If there are any other objects defined in the name list they will be ignored.

telecom
array[json]

Telecom is an optional list of objects where you can provide the child attributes listed below. Email and Phone system’s will be surfaced in the Canvas UI. Currently Canvas stores the other systems in our database, but does not display them.

Click to view child attributes
id
string
extension
array

This is an optional object that you can specify for a Patient’s phone number or email. This tells Canvas that the patient has consented to receiving text messages or emails to this contact point. This extension is identified with the url http://schemas.canvasmedical.com/fhir/extensions/has-consent. A boolean value can be specified in the valueBoolean attribute.

Note: This will not send a verification email or text as is the Canvas UI does. It will bypass this step and mark the contact as verified.

Click to view child attributes
url
string
valueBoolean
boolean
system
string

Supported values are phone, fax, email, pager, url, sms, and other. If omitted, the default value is other.

value
string required

Free text string of the value for this contact point

use
string

Supported values are home, work, temp, old and mobile. If omitted, the default value is home.

rank
integer

An integer representing the preferred order of contact points per system. The default value is 1.

gender
string required

The gender attribute is an optional string enum value that maps to our gender identity attribute on our UI. Currently Canvas accepts the following FHIR values: male, female, other, and unknown.

If unknown is entered at the time of creation, the patient chart will show gender as ‘choose not to disclose’. If other is selected, the patient chart will display Additional gender category or other, please specify in the gender field.

birthDate
date required

The birthDate field is required in Canvas for a patient. This is a string date format that is defined here. For Canvas it is best to get the format YYYY-MM-DD. If only a month and year is given, the birthdate is set to the 1st of the given month by default. If only a year is given, the birthdate defaults to January 1st of that year. To summarize, Canvas accepts the following formats: YYYY, YYYY-MM, and YYYY-MM-DD.

deceasedBoolean
boolean

Indicates if the individual is deceased or not.

address
array[json]

Address(es) for the individual.

Click to view child attributes
id
string
use
string

Supported values are home, work, temp and old. If omitted, the default value is home.

type
string

Supported values are both, physical and postal. If omitted, the default value is both.

line
string

List of strings. The first item in the list will be address line 1 in Canvas. The rest of the items in the list will be concatenated to be address line 2.

city
string

String representing the city of the address.

state
string

2 letter state abbreviation of the address.

postalCode
string

The 5 digit postal code of the address.

country
string

The ISO 3166 2 letter country code. If not provided, will default to “us”.

period
json
Click to view child attributes
start
date
end
date
photo
array[json]

When creating a Patient resource, a data attribute should include the photo as a base64-encoded string. This is different from a read or search, where a url attribute will contain a URL to the file.

contact
array[json]

A contact party (e.g. guardian, partner, friend) for the patient. Contact details will display on the Patient profile page in the Canvas UI.

Click to view child attributes
id
string

A Canvas identifier for the contact.

name
json required

This is an object where you can specify the text that stores the contact’s name.

Click to view child attributes
text
string
relationship
array[json]

This is a list of objects where you can specify a coding representing the relationship of the contact to the patient. Each entry can contain a text string attribute and a coding list. The text attribute is a free text string representing the relationship to the patient. The coding list can specify the configurable contact category codings this contact has to the patient.

Click to view child attributes
text
string
telecom
json

This is a list of objects where Canvas will take the first system equal to phone and store as the contact’s phone number. Then the first system equal to email will be stored as this contact’s email address. The value of the email or phone number is stored in the value field. If any other option is passed in the system field, the data will not be stored.

Click to view child attributes
system
string
value
string
extension
array[json]

An extension that includes the following values:

- Emergency Contact
- Authorized for Release of Information

communication
array[json]

A language which may be used to communicate with the patient about his or her health.

Click to view child attributes
language
json

The language which can be used to communicate with the patient about his or her health. Common Languages (Preferred but limited to AllLanguages).

Responses

201 Created
The server has successfully processed the request; the new resource has been created and is now ready for interaction.

Canvas returns the created resource's id as a UUID within the location header and a null response body.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
405 Method Not Allowed
The request performs an operation that is either not supported or allowed.
422 Unprocessable Entity
The request cannot be processed due to semantic issues or conflicts with the database state.
get
/Patient/{id}

Patient read

Path Parameters

id required
string
The unique identifier for the Patient

Response Payload Attributes

id
string

Unique Canvas identifier for this resource

text
json

A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource.

extension
array[json]

Reference the information at the top of this page to see the possible extensions contained in this resource. Please note that the birthsex extension is required.

identifier
array[json]

The identifier list defines additional identifiers that are able to be stored for a patient.

Click to view child attributes
use
string

Supported values are usual, official, temp, secondary and old. If omittted, the default value is usual.

system
string

Free text field to identify what this value represents.

value
string

Free text field to store the patient’s identifier.

period
date

This is used to specify the start and end dates (format YYYY-MM-DD). If period is omitted it will default to start = 1970-01-01 and end = 2100-12-31. There is currently no validation if the end date is before the start date.

active
boolean

A boolean to specify if the patient is active in the healthcare system. If this value is not set, Canvas will default this to true.

name
array[json]

The identifier of the patient. Name is a required list of objects.

One iteration must be marked with use: official. The first object with use: official will determine the patient’s first, last, prefix, suffix or middle name. The first and last name is required within Canvas. For example:

• the family attribute will populate the patient’s last name.
• the given list will populate the patient’s first/middle name. The first item in the list will be the first name, while if more items in the list exists, it will populate the patient’s middle name and be joined together with an empty space.
• the prefix attribute will be stored within Canvas’s database but will not be displayed in the Canvas UI.
• the suffix attribute will be displayed on the Canvas UI but it will not be editable through the UI.

The example also demonstrates that Canvas ingests a nickname (preferred name) for the Patient. This element is identified by use = nickname and the first item in the given list will be the Patient’s nickname. Canvas can also ingest old names or maiden names using use: maiden or use: old. These will not show up on the Canvas UI but will be stored by Canvas and will be returned via a read request.

In the Canvas UI, each patient will be displayed as first-last-suffix (nickname). Searches can be performed using first, middle, last, suffix or nickname.

If there are any other objects defined in the name list they will be ignored.

telecom
array[json]

Contact details for the individual.

Click to view child attributes
id
string
extension
array

This is an optional object that you can specify for a Patient’s phone number or email. This tells Canvas that the patient has consented to receiving text messages or emails to this contact point. This extension is identified with the url http://schemas.canvasmedical.com/fhir/extensions/has-consent. A boolean value can be specified in the valueBoolean attribute.

Note: This will not send a verification email or text as is the Canvas UI does. It will bypass this step and mark the contact as verified.

Click to view child attributes
url
string
valueBoolean
boolean
system
string

Supported values are phone, fax, email, pager, url, sms, and other. If omitted, the default value is other.

value
string

Free text string of the value for this contact point

use
string

Supported values are home, work, temp, old and mobile. If omitted, the default value is home.

rank
integer

An integer representing the preferred order of contact points per system. The default value is 1.

gender
string

A enum value that maps to the gender identity attribute in the Canvas UI. Supported values are male, female, other and unknown.

https://hl7.org/fhir/R4/valueset-administrative-gender.html

birthDate
date

The date of birth for the individual, formatted as YYYY-MM-DD.

deceasedBoolean
boolean

Indicates if the individual is deceased or not.

address
array[json]

Address(es) for the individual.

Click to view child attributes
id
string
use
string

Supported values are home, work, temp and old. If omitted, the default value is home.

type
string

Supported values are both, physical and postal. If omitted, the default value is both.

line
string

List of strings. The first item in the list will be address line 1 in Canvas. The rest of the items in the list will be concatenated to be address line 2.

city
string

String representing the city of the address.

state
string

2 letter state abbreviation of the address.

postalCode
string

The 5 digit postal code of the address.

country
string

The ISO 3166 2 letter country code. If not provided, will default to “us”.

period
json
Click to view child attributes
start
date
end
date
photo
array[json]

Image of the patient. This image shows on the patient avatar in the Canvas UI.

Note: There is a temporary extension that will contain the presigned URL for the Attachment; this will be provided while we migrate to static URLs that will require bearer authentication to retrieve attachment files. Use this extension for backward-compatible URLs until the migration is completed.

contact
array[json]

A contact party (e.g. guardian, partner, friend) for the patient. Contact details will display on the Patient profile page in the Canvas UI.

Click to view child attributes
id
string

A Canvas identifier for the contact.

name
json

This is an object where you can specify the text that stores the contact’s name.

Click to view child attributes
text
string
relationship
array[json]

This is a list of objects where you can specify a coding representing the relationship of the contact to the patient. Each entry can contain a text string attribute and a coding list. The text attribute is a free text string representing the relationship to the patient. The coding list can specify the configurable contact category codings this contact has to the patient.

Click to view child attributes
text
string
telecom
json

This is a list of objects where Canvas will take the first system equal to phone and store as the contact’s phone number. Then the first system equal to email will be stored as this contact’s email address. The value of the email or phone number is stored in the value field. If any other option is passed in the system field, the data will not be stored.

Click to view child attributes
system
string
value
string
extension
array[json]

An extension that includes the following values:

- Emergency Contact
- Authorized for Release of Information

communication
array[json]

A language which may be used to communicate with the patient about his or her health.

Click to view child attributes
language
json

The language which can be used to communicate with the patient about his or her health. Common Languages (Preferred but limited to AllLanguages).

Responses

200 OK
Request was successful.

Errors

401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.
put
/Patient/{id}

Patient update

How updates/deletions to the identifier, telecom, address, and contact fields are handled:

Patient Search/Read will include an id value for these fields.

If the id field is included in the iteration, then Canvas will attempt to match to an existing value for that field.

If the id field is not included in the iteration, then Canvas will attempt to create a new entry in the database for that field.

If a telecom, address, or contact iteration returned via Search/Read is not included in the Update message, then it will be deleted. The same delete behaviour occurs with preferred-pharmacy, default-provider and default-location extensions - their respective values get dropped from the Canvas if those extensions are not present during update.

Other Fields

If a field is required according to Patient Create, it is also required in the update. If the field is not required and is not added to the update request, the saved data will not be changed.

Attributes

id
string

Unique Canvas identifier for this resource

text
json

A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource.

extension
array[json]

Reference the information at the top of this page to see the possible extensions contained in this resource. Please note that the birthsex extension is required.

identifier
array[json]

The identifier list defines additional identifiers that are able to be stored for a patient. None of these identifiers will be surfaced on the Patient’s chart but may help you to identify the patient in your internal system. If an identifier already exists in the Canvas database and is not included in the Update message, it will be deleted if and only if the period.end date is in the future.

Click to view child attributes
use
string

Supported values are usual, official, temp, secondary and old. If omittted, the default value is usual.

system
string

Free text field to identify what this value represents.

value
string

Free text field to store the patient’s identifier.

period
date

This is used to specify the start and end dates (format YYYY-MM-DD). If period is omitted it will default to start = 1970-01-01 and end = 2100-12-31. There is currently no validation if the end date is before the start date.

active
boolean

A boolean to specify if the patient is active in the healthcare system. If this value is not set, Canvas will default this to true.

name
array[json] required

The identifier of the patient. Name is a required list of objects.

One iteration must be marked with use: official. The first object with use: official will determine the patient’s first, last, prefix, suffix or middle name. The first and last name is required within Canvas. For example:

• the family attribute will populate the patient’s last name.
• the given list will populate the patient’s first/middle name. The first item in the list will be the first name, while if more items in the list exists, it will populate the patient’s middle name and be joined together with an empty space.
• the prefix attribute will be stored within Canvas’s database but will not be displayed in the Canvas UI.
• the suffix attribute will be displayed on the Canvas UI but it will not be editable through the UI.

The example also demonstrates that Canvas ingests a nickname (preferred name) for the Patient. This element is identified by use = nickname and the first item in the given list will be the Patient’s nickname. Canvas can also ingest old names or maiden names using use: maiden or use: old. These will not show up on the Canvas UI but will be stored by Canvas and will be returned via a read request.

In the Canvas UI, each patient will be displayed as first-last-suffix (nickname). Searches can be performed using first, middle, last, suffix or nickname.

If there are any other objects defined in the name list they will be ignored.

telecom
array[json]

Telecom is an optional list of objects where you can provide the child attributes listed below. Email and Phone system’s will be surfaced in the Canvas UI. Currently Canvas stores the other systems in our database, but does not display them.

Click to view child attributes
id
string
extension
array

This is an optional object that you can specify for a Patient’s phone number or email. This tells Canvas that the patient has consented to receiving text messages or emails to this contact point. This extension is identified with the url http://schemas.canvasmedical.com/fhir/extensions/has-consent. A boolean value can be specified in the valueBoolean attribute.

Note: This will not send a verification email or text as is the Canvas UI does. It will bypass this step and mark the contact as verified.

Click to view child attributes
url
string
valueBoolean
boolean
system
string

Supported values are phone, fax, email, pager, url, sms, and other. If omitted, the default value is other.

value
string required

Free text string of the value for this contact point

use
string

Supported values are home, work, temp, old and mobile. If omitted, the default value is home.

rank
integer

An integer representing the preferred order of contact points per system. The default value is 1.

gender
string required

The gender attribute is an optional string enum value that maps to our gender identity attribute on our UI. Currently Canvas accepts the following FHIR values: male, female, other, and unknown.

If unknown is entered at the time of creation, the patient chart will show gender as ‘choose not to disclose’. If other is selected, the patient chart will display Additional gender category or other, please specify in the gender field.

birthDate
date required

The birthDate field is required in Canvas for a patient. This is a string date format that is defined here. For Canvas it is best to get the format YYYY-MM-DD. If only a month and year is given, the birthdate is set to the 1st of the given month by default. If only a year is given, the birthdate defaults to January 1st of that year. To summarize, Canvas accepts the following formats: YYYY, YYYY-MM, and YYYY-MM-DD.

deceasedBoolean
boolean

Indicates if the individual is deceased or not.

address
array[json]

Address(es) for the individual.

Click to view child attributes
id
string
use
string

Supported values are home, work, temp and old. If omitted, the default value is home.

type
string

Supported values are both, physical and postal. If omitted, the default value is both.

line
string

List of strings. The first item in the list will be address line 1 in Canvas. The rest of the items in the list will be concatenated to be address line 2.

city
string

String representing the city of the address.

state
string

2 letter state abbreviation of the address.

postalCode
string

The 5 digit postal code of the address.

country
string

The ISO 3166 2 letter country code. If not provided, will default to “us”.

period
json
Click to view child attributes
start
date
end
date
photo
array[json]

When creating a Patient resource, a data attribute should include the photo as a base64-encoded string. This is different from a read or search, where a url attribute will contain a URL to the file.

contact
array[json]

A contact party (e.g. guardian, partner, friend) for the patient. Contact details will display on the Patient profile page in the Canvas UI.

Click to view child attributes
id
string

A Canvas identifier for the contact.

name
json required

This is an object where you can specify the text that stores the contact’s name.

Click to view child attributes
text
string
relationship
array[json]

This is a list of objects where you can specify a coding representing the relationship of the contact to the patient. Each entry can contain a text string attribute and a coding list. The text attribute is a free text string representing the relationship to the patient. The coding list can specify the configurable contact category codings this contact has to the patient.

Click to view child attributes
text
string
telecom
json

This is a list of objects where Canvas will take the first system equal to phone and store as the contact’s phone number. Then the first system equal to email will be stored as this contact’s email address. The value of the email or phone number is stored in the value field. If any other option is passed in the system field, the data will not be stored.

Click to view child attributes
system
string
value
string
extension
array[json]

An extension that includes the following values:

- Emergency Contact
- Authorized for Release of Information

communication
array[json]

communication.language is an object that contains a coding and a text description. Currently, Canvas only supports the language being set to English. If no language is added, it will default to English. Currently, it cannot be updated.

Click to view child attributes
language
json

The language which can be used to communicate with the patient about his or her health. Common Languages (Preferred but limited to AllLanguages).

Responses

200 OK
The server has successfully processed the request.

Canvas returns a null response body.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
404 Not Found
The requested resource was not found.
405 Method Not Allowed
The request performs an operation that is either not supported or allowed.
412 Precondition Failed
The request depends on a precondition that has not been met.
422 Unprocessable Entity
The request cannot be processed due to semantic issues or conflicts with the database state.

Query Parameters

_has:CareTeam:participant:member
boolean

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}

_id
string

A Canvas-issued unique identifier known as the patient key. This can be found in the url of the patient’s chart.

_sort
string

Triggers sorting of the results by a specific criteria. Supported values are _id, birthdate, family, and given. Use -_id, -birthdate, -family, and -given to sort in descending order.

active
boolean

By default, both active and inactive patients are returned. Use this parameter to only return active (true) or inactive (false) patients.

birthDate
date

The patient’s birthdate

email
string

Patient email address

family
string

Last name

gender
string

The gender of the patient. Supported values are male, female, other and unknown.

given
string

First Name

identifier
string

The Canvas-issued MRN or a saved identifier from an external system.

Examples:

/Patient?identifier=abc123 will return patients with an identifier of “abc123” issued by any system, including Canvas-issued MRNs

/Patient?identifier=foo|abc123 will return patients with an identifier of “abc123” issued by the system named “foo”

/Patient?identifier=http://canvasmedical.com|012345 will return the patient with the Canvas-issued MRN of “012345”

/Patient?identifier=foo| will return all patients with an identifier issued by the system named “foo”

/Patient?identifier=|abc123 will return patients with an identifier of “abc123” issued by the system named “” (empty string)

name
string

Part of a first or last name

nickname
string

Preferred or alternate name

phone
string

Patient phone number. Expected to be 10 digits.

Response Payload Attributes

resourceType
string

The FHIR Resource name.

type
string

This element and value designate that the bundle is a search response. Search result bundles will always have the Bundle.type of searchset .

total
integer

The number of resources that match the search parameter.

link
array[json]

Attributes relevant to pagination, see our Pagination page for more detail.

Click to view child attributes
relation
enum [self|first|next|last]

The relation of the page search

url

The search url for the specific relation

entry
array[json]

The results bundle that lists out each object returned in the search

Click to view child attributes
resource
json

The attributes specific to the resource type, see the Attributes section below

Attributes

id
string

Unique Canvas identifier for this resource

text
json

A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource.

extension
array[json]

Reference the information at the top of this page to see the possible extensions contained in this resource. Please note that the birthsex extension is required.

identifier
array[json]

The identifier list defines additional identifiers that are able to be stored for a patient.

Click to view child attributes
use
string

Supported values are usual, official, temp, secondary and old. If omittted, the default value is usual.

system
string

Free text field to identify what this value represents.

value
string

Free text field to store the patient’s identifier.

period
date

This is used to specify the start and end dates (format YYYY-MM-DD). If period is omitted it will default to start = 1970-01-01 and end = 2100-12-31. There is currently no validation if the end date is before the start date.

active
boolean

A boolean to specify if the patient is active in the healthcare system. If this value is not set, Canvas will default this to true.

name
array[json]

The identifier of the patient. Name is a required list of objects.

One iteration must be marked with use: official. The first object with use: official will determine the patient’s first, last, prefix, suffix or middle name. The first and last name is required within Canvas. For example:

• the family attribute will populate the patient’s last name.
• the given list will populate the patient’s first/middle name. The first item in the list will be the first name, while if more items in the list exists, it will populate the patient’s middle name and be joined together with an empty space.
• the prefix attribute will be stored within Canvas’s database but will not be displayed in the Canvas UI.
• the suffix attribute will be displayed on the Canvas UI but it will not be editable through the UI.

The example also demonstrates that Canvas ingests a nickname (preferred name) for the Patient. This element is identified by use = nickname and the first item in the given list will be the Patient’s nickname. Canvas can also ingest old names or maiden names using use: maiden or use: old. These will not show up on the Canvas UI but will be stored by Canvas and will be returned via a read request.

In the Canvas UI, each patient will be displayed as first-last-suffix (nickname). Searches can be performed using first, middle, last, suffix or nickname.

If there are any other objects defined in the name list they will be ignored.

telecom
array[json]

Contact details for the individual.

Click to view child attributes
id
string
extension
array

This is an optional object that you can specify for a Patient’s phone number or email. This tells Canvas that the patient has consented to receiving text messages or emails to this contact point. This extension is identified with the url http://schemas.canvasmedical.com/fhir/extensions/has-consent. A boolean value can be specified in the valueBoolean attribute.

Note: This will not send a verification email or text as is the Canvas UI does. It will bypass this step and mark the contact as verified.

Click to view child attributes
url
string
valueBoolean
boolean
system
string

Supported values are phone, fax, email, pager, url, sms, and other. If omitted, the default value is other.

value
string

Free text string of the value for this contact point

use
string

Supported values are home, work, temp, old and mobile. If omitted, the default value is home.

rank
integer

An integer representing the preferred order of contact points per system. The default value is 1.

gender
string

A enum value that maps to the gender identity attribute in the Canvas UI. Supported values are male, female, other and unknown.

https://hl7.org/fhir/R4/valueset-administrative-gender.html

birthDate
date

The date of birth for the individual, formatted as YYYY-MM-DD.

deceasedBoolean
boolean

Indicates if the individual is deceased or not.

address
array[json]

Address(es) for the individual.

Click to view child attributes
id
string
use
string

Supported values are home, work, temp and old. If omitted, the default value is home.

type
string

Supported values are both, physical and postal. If omitted, the default value is both.

line
string

List of strings. The first item in the list will be address line 1 in Canvas. The rest of the items in the list will be concatenated to be address line 2.

city
string

String representing the city of the address.

state
string

2 letter state abbreviation of the address.

postalCode
string

The 5 digit postal code of the address.

country
string

The ISO 3166 2 letter country code. If not provided, will default to “us”.

period
json
Click to view child attributes
start
date
end
date
photo
array[json]

Image of the patient. This image shows on the patient avatar in the Canvas UI.

Note: There is a temporary extension that will contain the presigned URL for the Attachment; this will be provided while we migrate to static URLs that will require bearer authentication to retrieve attachment files. Use this extension for backward-compatible URLs until the migration is completed.

contact
array[json]

A contact party (e.g. guardian, partner, friend) for the patient. Contact details will display on the Patient profile page in the Canvas UI.

Click to view child attributes
id
string

A Canvas identifier for the contact.

name
json

This is an object where you can specify the text that stores the contact’s name.

Click to view child attributes
text
string
relationship
array[json]

This is a list of objects where you can specify a coding representing the relationship of the contact to the patient. Each entry can contain a text string attribute and a coding list. The text attribute is a free text string representing the relationship to the patient. The coding list can specify the configurable contact category codings this contact has to the patient.

Click to view child attributes
text
string
telecom
json

This is a list of objects where Canvas will take the first system equal to phone and store as the contact’s phone number. Then the first system equal to email will be stored as this contact’s email address. The value of the email or phone number is stored in the value field. If any other option is passed in the system field, the data will not be stored.

Click to view child attributes
system
string
value
string
extension
array[json]

An extension that includes the following values:

- Emergency Contact
- Authorized for Release of Information

communication
array[json]

A language which may be used to communicate with the patient about his or her health.

Click to view child attributes
language
json

The language which can be used to communicate with the patient about his or her health. Common Languages (Preferred but limited to AllLanguages).

Responses

200 OK
Request was successful.

Errors

400 Bad Request
The request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401 Unauthorized
The request requires user authentication.
403 Forbidden
The request requires user authorization.
  • 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-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/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://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"
                            }
                        ],
                        "text": "Spouse"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "danjones@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": true
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": true
                    }
                ]
            },
            {
                "name":
                {
                    "text": "Linda Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Mother"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "phone",
                        "value": "5557327068"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": false
                    }
                ]
            },
            {
                "name":
                {
                    "text": "Jimmy Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Father"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "j.stewart@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": false
                    }
                ]
            }
        ],
        "communication":
        [
            {
                "language":
                {
                    "coding":
                    [
                        {
                            "system": "http://hl7.org/fhir/ValueSet/all-languages",
                            "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-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/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://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"
                            }
                        ],
                        "text": "Spouse"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "danjones@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": True
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": True
                    }
                ]
            },
            {
                "name":
                {
                    "text": "Linda Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Mother"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "phone",
                        "value": "5557327068"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": False
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": False
                    }
                ]
            },
            {
                "name":
                {
                    "text": "Jimmy Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Father"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "j.stewart@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": False
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": False
                    }
                ]
            }
        ],
        "communication":
        [
            {
                "language":
                {
                    "coding":
                    [
                        {
                            "system": "http://hl7.org/fhir/ValueSet/all-languages",
                            "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-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"
            },
            {
                "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-race"
            },
            {
                "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-ethnicity"
            },
            {
                "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"
            },
            {
                "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/preferred-pharmacy"
            },
            {
                "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":
        [
            {
                "extension": [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/deprecated-url",
                        "valueUri": "https://d3hn0m4rbsz438.cloudfront.net/avatar1.png"
                    }
                ],
                "url": "https://fumage-example.canvasmedical.com/Patient/7162fd82487e4dc8aa2581ddbca91892/files/photo"
            }
        ],
        "contact":
        [
            {
                "id": "1ba81cb4-7f97-429d-b0d8-4c4f067b11a5",
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": true
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": true
                    }
                ],
                "relationship":
                [
                    {
                        "coding": [
                            {
                                "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"
                            }
                        ],
                        "text": "Spouse"
                    }
                ],
                "name":
                {
                    "text": "Dan Jones"
                },
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "danjones@example.com"
                    }
                ]
            },
            {
                "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3",
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": false
                    }
                ],
                "relationship":
                [
                    {
                        "text": "Mother"
                    }
                ],
                "name":
                {
                    "text": "Linda Stewart"
                },
                "telecom":
                [
                    {
                        "system": "phone",
                        "value": "5557327068"
                    }
                ]
            },
            {
                "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb",
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": false
                    }
                ],
                "relationship":
                [
                    {
                        "text": "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-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/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"
                ]
            },
            {
                "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://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"
                            }
                        ],
                        "text": "Spouse"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "danjones@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": true
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": true
                    }
                ]
            },
            {
                "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3",
                "name":
                {
                    "text": "Linda Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Mother"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "phone",
                        "value": "5557327068"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": false
                    }
                ]
            },
            {
                "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb",
                "name":
                {
                    "text": "Jimmy Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Father"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "j.stewart@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": false
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": false
                    }
                ]
            }
        ],
        "communication":
        [
            {
                "language":
                {
                    "coding":
                    [
                        {
                            "system": "http://hl7.org/fhir/ValueSet/all-languages",
                            "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-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/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"
                ]
            },
            {
                "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://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"
                            }
                        ],
                        "text": "Spouse"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "danjones@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": True
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": True
                    }
                ]
            },
            {
                "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3",
                "name":
                {
                    "text": "Linda Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Mother"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "phone",
                        "value": "5557327068"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": False
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": False
                    }
                ]
            },
            {
                "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb",
                "name":
                {
                    "text": "Jimmy Stewart"
                },
                "relationship":
                [
                    {
                        "text": "Father"
                    }
                ],
                "telecom":
                [
                    {
                        "system": "email",
                        "value": "j.stewart@example.com"
                    }
                ],
                "extension":
                [
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                        "valueBoolean": False
                    },
                    {
                        "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                        "valueBoolean": False
                    }
                ]
            }
        ],
        "communication":
        [
            {
                "language":
                {
                    "coding":
                    [
                        {
                            "system": "http://hl7.org/fhir/ValueSet/all-languages",
                            "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-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"
                        },
                        {
                            "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-race"
                        },
                        {
                            "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-ethnicity"
                        },
                        {
                            "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"
                        },
                        {
                            "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/preferred-pharmacy"
                        },
                        {
                            "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",
                            "extension":
                            [
                                {
                                    "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                                    "valueBoolean": true
                                },
                                {
                                    "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                                    "valueBoolean": true
                                }
                            ],
                            "relationship":
                            [
                                {
                                    "coding": [
                                        {
                                            "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"
                                        }
                                    ],
                                    "text": "Spouse"
                                }
                            ],
                            "name":
                            {
                                "text": "Dan Jones"
                            },
                            "telecom":
                            [
                                {
                                    "system": "email",
                                    "value": "danjones@example.com"
                                }
                            ]
                        },
                        {
                            "id": "f259a2b0-6bae-479b-8efe-f9436046cfb3",
                            "extension":
                            [
                                {
                                    "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                                    "valueBoolean": false
                                },
                                {
                                    "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                                    "valueBoolean": false
                                }
                            ],
                            "relationship":
                            [
                                {
                                    "text": "Mother"
                                }
                            ],
                            "name":
                            {
                                "text": "Linda Stewart"
                            },
                            "telecom":
                            [
                                {
                                    "system": "phone",
                                    "value": "5557327068"
                                }
                            ]
                        },
                        {
                            "id": "30639a10-18c2-4222-8d26-32b2ca36a1bb",
                            "extension":
                            [
                                {
                                    "url": "http://schemas.canvasmedical.com/fhir/extensions/emergency-contact",
                                    "valueBoolean": false
                                },
                                {
                                    "url": "http://schemas.canvasmedical.com/fhir/extensions/authorized-for-release-of-information",
                                    "valueBoolean": false
                                }
                            ],
                            "relationship":
                            [
                                {
                                    "text": "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"
          }
        }
      ]
    }