AllergyIntolerance

Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.

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

To learn more about documenting allergies in Canvas see here.

post
/AllergyIntolerance

AllergyIntolerance create

Create an AllergyIntolerance resource.

Attributes

resourceType
string

The FHIR Resource name.

extension
array[json]

Canvas supports a note identifier extension on this resource. The note identifier can be used with the Canvas Note API.

Canvas recommends sending the note identifier extension or the Encounter reference, but not both. If both are supplied, they must both refer to the same note. If neither is specified, it will insert into a Data Import note where the DOS is the current time of ingestion.

Click to view child attributes
url
string

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/note-id
valueId
string

The valueId field is used for the Note extension and will be the note’s unique identifier.

clinicalStatus
json required

The clinical status of the allergy or intolerance.

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
code
string required

The code of the clinical status.

Value Options Supported:
  • active
  • inactive
verificationStatus
json required

Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
code
string required

The code of the verification status.

Value Options Supported:
  • confirmed
  • entered-in-error
type
enum [ allergy | intolerance ] required

Identification of the underlying physiological mechanism for the reaction risk.

code
json required

Code that identifies the allergy or intolerance.

Supported codings for create interactions are obtained from the Allergen search endpoint. At least one coding needs to be an FDB coding.

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://www.fdbhealth.com/
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://snomed.info/sct
code
string required

The code of the allergen.

patient
json required

Who the sensitivity is for.

Click to view child attributes
reference
string required

The reference string of the patient in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787".

type
string

Type the reference refers to (e.g. “Patient”).

encounter
json

Encounter when the allergy or intolerance was asserted.

Supply an encounter reference to be able to insert the allergy command into a specific note on the patient’s timeline. If no encounter is specified, it will insert into a Data Import note where the DOS is the current time of ingestion.

Canvas does not currently support concurrent creation of resources on the same encounter. Please avoid issuing concurrent requests that reference the same encounter to this endpoint, or to any other endpoints that reference encounters. It is OK to issue concurrent requests to these endpoints as long as the requests reference different encounters.

Click to view child attributes
reference
string

The reference string of the encounter in the format of "Encounter/086cd6fe-2c94-455d-a53e-6ff1c2652cae".

type
string

Type the reference refers to (e.g. “Encounter”).

onsetDateTime
date

When allergy or intolerance was identified.

recorder
json

Who recorded the sensitivity.

In Canvas this will be the originator and committer of the allergy command.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

lastOccurrence
date

Date of last known occurrence of a reaction.

This date will not appear in the Canvas UI and can only be supplied or read through FHIR.

note
array[json]

Additional text not captured in other fields.

Canvas will display this in the reaction field of the allergy command. If there are multiple objects given, they will be separeted by a new line on the UI.

Click to view child attributes
text
string required

The annotation - text content.

reaction
array[json]

Adverse Reaction Events linked to exposure to substance. Only one reaction is supported.

Click to view child attributes
manifestation
array[json] required

Clinical symptoms/signs associated with the Event.

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/data-absent-reason
code
string required

The code of the verification status.

Value Options Supported:
  • unknown
severity
string

Clinical assessment of the severity of the reaction event as a whole.

Value Options Supported:
  • mild
  • moderate
  • severe

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
/AllergyIntolerance/{id}

AllergyIntolerance read

Read an AllergyIntolerance resource.

Path Parameters

id required
string
The unique identifier for the AllergyIntolerance

Response Payload Attributes

resourceType
string

The FHIR Resource name.

id
string

The identifier of the AllergyIntolerance.

extension
array[json]

Canvas supports a note identifier extension on this resource. The note identifier can be used with the Canvas Note API.

Click to view child attributes
url
string

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/note-id
valueId
string

The valueId field is used for the Note extension and will be the note’s unique identifier.

clinicalStatus
json

The clinical status of the allergy or intolerance.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
code
string

The code of the clinical status.

Value Options Supported:
  • active
  • inactive
display
string

The display name of the coding.

Value Options Supported:
  • Active
  • Inactive
text
string

Plain text representation of the concept.

Value Options Supported:
  • Active
  • Inactive
verificationStatus
json

Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
code
string

The code of the verification status.

Value Options Supported:
  • confirmed
  • entered-in-error
display
string

The display name of the coding.

Value Options Supported:
  • Confirmed
  • Entered-in-error
text
string

Plain text representation of the concept.

Value Options Supported:
  • Confirmed
  • Entered-in-error
type
enum [ allergy | intolerance ]

Identification of the underlying physiological mechanism for the reaction risk.

code
json

Code that identifies the allergy or intolerance.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://www.fdbhealth.com/
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://snomed.info/sct
code
string

The code of the allergen.

display
string

The display name of the coding.

patient
json

Who the sensitivity is for.

Click to view child attributes
reference
string

The reference string of the patient in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787".

type
string

Type the reference refers to (e.g. “Patient”).

encounter
json

Encounter when the allergy or intolerance was asserted.

Click to view child attributes
reference
string

The reference string of the encounter in the format of "Encounter/086cd6fe-2c94-455d-a53e-6ff1c2652cae".

type
string

Type the reference refers to (e.g. “Encounter”).

onsetDateTime
date

When allergy or intolerance was identified.

recordedDate
datetime

Date first version of the resource instance was recorded.

recorder
json

Who recorded the sensitivity.

In Canvas this will be the originator and committer of the allergy command.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

lastOccurrence
date

Date of last known occurrence of a reaction.

This date will not appear in the Canvas UI and can only be supplied or read through FHIR.

note
array[json]

Additional text not captured in other fields.

Canvas will display this in the reaction field of the allergy command. If there are multiple objects given, they will be separeted by a new line on the UI.

Click to view child attributes
text
string

The annotation - text content.

reaction
array[json]

Adverse Reaction Events linked to exposure to substance. Only one reaction is supported.

Click to view child attributes
manifestation
array[json]

Clinical symptoms/signs associated with the Event.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/data-absent-reason
code
string

The code of the verification status.

Value Options Supported:
  • unknown
display
string

The display name of the coding.

Value Options Supported:
  • Unknown
text
string

Plain text representation of the concept.

Value Options Supported:
  • Unknown
severity
string

Clinical assessment of the severity of the reaction event as a whole.

Value Options Supported:
  • mild
  • moderate
  • severe

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
/AllergyIntolerance/{id}

AllergyIntolerance update

Update an AllergyIntolerance resource.

The only type of AllergyIntolerance update interaction that is supported by Canvas is to mark an existing AllergyIntolerance as entered-in-error using the verificationStatus attribute. No changes to other fields will be processed; however, required fields still need to be supplied.

Attributes

resourceType
string

The FHIR Resource name.

id
string required

The identifier of the AllergyIntolerance.

extension
array[json]

Canvas supports a note identifier extension on this resource. The note identifier can be used with the Canvas Note API.

Click to view child attributes
url
string

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/note-id
valueId
string

The valueId field is used for the Note extension and will be the note’s unique identifier.

clinicalStatus
json required

The clinical status of the allergy or intolerance.

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
code
string required

The code of the clinical status.

Value Options Supported:
  • active
  • inactive
verificationStatus
json required

Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
code
string required

The code of the verification status.

Value Options Supported:
  • confirmed
  • entered-in-error
type
enum [ allergy | intolerance ] required

Identification of the underlying physiological mechanism for the reaction risk.

code
json required

Code that identifies the allergy or intolerance.

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://www.fdbhealth.com/
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://snomed.info/sct
code
string required

The code of the allergen.

patient
json required

Who the sensitivity is for.

Click to view child attributes
reference
string required

The reference string of the patient in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787".

type
string

Type the reference refers to (e.g. “Patient”).

encounter
json

Encounter when the allergy or intolerance was asserted.

Click to view child attributes
reference
string

The reference string of the encounter in the format of "Encounter/086cd6fe-2c94-455d-a53e-6ff1c2652cae".

type
string

Type the reference refers to (e.g. “Encounter”).

onsetDateTime
date

When allergy or intolerance was identified.

recorder
json

Who recorded the sensitivity.

In Canvas this will be the originator and committer of the allergy command.

Click to view child attributes
reference
string required

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

lastOccurrence
date

Date of last known occurrence of a reaction.

This date will not appear in the Canvas UI and can only be supplied or read through FHIR.

note
array[json]

Additional text not captured in other fields.

Canvas will display this in the reaction field of the allergy command. If there are multiple objects given, they will be separeted by a new line on the UI.

Click to view child attributes
text
string required

The annotation - text content.

reaction
array[json]

Adverse Reaction Events linked to exposure to substance. Only one reaction is supported.

Click to view child attributes
manifestation
array[json] required

Clinical symptoms/signs associated with the Event.

Click to view child attributes
coding
array[json] required

Identifies where the definition of the code comes from.

Click to view child attributes
system
string required

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/data-absent-reason
code
string required

The code of the verification status.

Value Options Supported:
  • unknown
severity
string

Clinical assessment of the severity of the reaction event as a whole.

Value Options Supported:
  • mild
  • moderate
  • severe

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

_id
string

The identifier of the AllergyIntolerance.

patient
string

The patient reference associated to the AllergyIntolerance in the format Patient/a39cafb9d1b445be95a2e2548e12a787.

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

resourceType
string

The FHIR Resource name.

id
string

The identifier of the AllergyIntolerance.

extension
array[json]

Canvas supports a note identifier extension on this resource. The note identifier can be used with the Canvas Note API.

Click to view child attributes
url
string

Reference that defines the content of this object.

Value Options Supported:
  • http://schemas.canvasmedical.com/fhir/extensions/note-id
valueId
string

The valueId field is used for the Note extension and will be the note’s unique identifier.

clinicalStatus
json

The clinical status of the allergy or intolerance.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical
code
string

The code of the clinical status.

Value Options Supported:
  • active
  • inactive
display
string

The display name of the coding.

Value Options Supported:
  • Active
  • Inactive
text
string

Plain text representation of the concept.

Value Options Supported:
  • Active
  • Inactive
verificationStatus
json

Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/allergyintolerance-verification
code
string

The code of the verification status.

Value Options Supported:
  • confirmed
  • entered-in-error
display
string

The display name of the coding.

Value Options Supported:
  • Confirmed
  • Entered-in-error
text
string

Plain text representation of the concept.

Value Options Supported:
  • Confirmed
  • Entered-in-error
type
enum [ allergy | intolerance ]

Identification of the underlying physiological mechanism for the reaction risk.

code
json

Code that identifies the allergy or intolerance.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://www.fdbhealth.com/
  • http://www.nlm.nih.gov/research/umls/rxnorm
  • http://snomed.info/sct
code
string

The code of the allergen.

display
string

The display name of the coding.

patient
json

Who the sensitivity is for.

Click to view child attributes
reference
string

The reference string of the patient in the format of "Patient/a39cafb9d1b445be95a2e2548e12a787".

type
string

Type the reference refers to (e.g. “Patient”).

encounter
json

Encounter when the allergy or intolerance was asserted.

Click to view child attributes
reference
string

The reference string of the encounter in the format of "Encounter/086cd6fe-2c94-455d-a53e-6ff1c2652cae".

type
string

Type the reference refers to (e.g. “Encounter”).

onsetDateTime
date

When allergy or intolerance was identified.

recordedDate
datetime

Date first version of the resource instance was recorded.

recorder
json

Who recorded the sensitivity.

In Canvas this will be the originator and committer of the allergy command.

Click to view child attributes
reference
string

The reference string of the practitioner in the format of "Practitioner/4150cd20de8a470aa570a852859ac87e.

type
string

Type the reference refers to (e.g. “Practitioner”).

lastOccurrence
date

Date of last known occurrence of a reaction.

This date will not appear in the Canvas UI and can only be supplied or read through FHIR.

note
array[json]

Additional text not captured in other fields.

Canvas will display this in the reaction field of the allergy command. If there are multiple objects given, they will be separeted by a new line on the UI.

Click to view child attributes
text
string

The annotation - text content.

reaction
array[json]

Adverse Reaction Events linked to exposure to substance. Only one reaction is supported.

Click to view child attributes
manifestation
array[json]

Clinical symptoms/signs associated with the Event.

Click to view child attributes
coding
array[json]

Identifies where the definition of the code comes from.

Click to view child attributes
system
string

The system url of the coding.

Value Options Supported:
  • http://terminology.hl7.org/CodeSystem/data-absent-reason
code
string

The code of the verification status.

Value Options Supported:
  • unknown
display
string

The display name of the coding.

Value Options Supported:
  • Unknown
text
string

Plain text representation of the concept.

Value Options Supported:
  • Unknown
severity
string

Clinical assessment of the severity of the reaction event as a whole.

Value Options Supported:
  • mild
  • moderate
  • severe

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/AllergyIntolerance' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json' \
         --header 'content-type: application/json' \
         --data '
    {
        "resourceType": "AllergyIntolerance",
        "extension": [
            {
                "url": "http://schemas.canvasmedical.com/fhir/extensions/note-id",
                "valueId": "2a8154d8-9420-4ab5-97f8-c2dae5a10af5",
            }
        ],
        "clinicalStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
                    "code": "active",
                    "display": "Active"
                }
            ],
            "text": "Active"
        },
        "verificationStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
                    "code": "confirmed",
                    "display": "Confirmed"
                }
            ],
            "text": "Confirmed"
        },
        "type": "allergy",
        "code": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "2-15588",
                    "display": "Allergy Medicine"
                }
            ],
            "text": "Allergy Medicine"
        },
        "patient": {
            "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
        },
        "encounter": {
            "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc"
        },
        "onsetDateTime": "2023-06-15",
        "recorder": {
            "reference": "Practitioner/76428138e7644ce6b7eb426fdbbf2f39"
        },
        "lastOccurrence": "2023-06-17",
        "note": [
            {
                "text": "AllergyIntolerance note"
            }
        ],
        "reaction": [
            {
                "manifestation": [
                    {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
                                "code": "unknown",
                                "display": "Unknown"
                            }
                        ],
                        "text": "Unknown"
                    }
                ],
                "severity": "moderate"
            }
        ]
    }'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/AllergyIntolerance"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>",
        "content-type": "application/json"
    }
    
    payload = {
        "resourceType": "AllergyIntolerance",
        "extension": [
            {
                "url": "http://schemas.canvasmedical.com/fhir/extensions/note-id",
                "valueId": "2a8154d8-9420-4ab5-97f8-c2dae5a10af5",
            }
        ],
        "clinicalStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
                    "code": "active",
                    "display": "Active"
                }
            ],
            "text": "Active"
        },
        "verificationStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
                    "code": "confirmed",
                    "display": "Confirmed"
                }
            ],
            "text": "Confirmed"
        },
        "type": "allergy",
        "code": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "2-15588",
                    "display": "Allergy Medicine"
                }
            ],
            "text": "Allergy Medicine"
        },
        "patient": {
            "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
        },
        "encounter": {
            "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc"
        },
        "onsetDateTime": "2023-06-15",
        "recorder": {
            "reference": "Practitioner/76428138e7644ce6b7eb426fdbbf2f39"
        },
        "lastOccurrence": "2023-06-17",
        "note": [
            {
                "text": "AllergyIntolerance note"
            }
        ],
        "reaction": [
            {
                "manifestation": [
                    {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
                                "code": "unknown",
                                "display": "Unknown"
                            }
                        ],
                        "text": "Unknown"
                    }
                ],
                "severity": "moderate"
            }
        ]
    }
    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/AllergyIntolerance/<id>' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/AllergyIntolerance/<id>"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>"
    }
    
    response = requests.get(url, headers=headers)
    
    print(response.text)
    
  • {
        "resourceType": "AllergyIntolerance",
        "id": "3340c331-d446-4700-9c23-7959bd393f26",
        "extension": [
            {
                "url": "http://schemas.canvasmedical.com/fhir/extensions/note-id",
                "valueId": "2a8154d8-9420-4ab5-97f8-c2dae5a10af5",
            }
        ],
        "clinicalStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
                    "code": "active",
                    "display": "Active"
                }
            ],
            "text": "Active"
        },
        "verificationStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
                    "code": "confirmed",
                    "display": "Confirmed"
                }
            ],
            "text": "Confirmed"
        },
        "type": "allergy",
        "code": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "2-15588",
                    "display": "Allergy Medicine"
                }
            ],
            "text": "Allergy Medicine"
        },
        "patient": {
            "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
        },
        "encounter": {
            "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc"
        },
        "onsetDateTime": "2023-06-15",
        "recorder": {
            "reference": "Practitioner/76428138e7644ce6b7eb426fdbbf2f39"
        },
        "lastOccurrence": "2023-06-17",
        "note": [
            {
                "text": "AllergyIntolerance note"
            }
        ],
        "reaction": [
            {
                "manifestation": [
                    {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
                                "code": "unknown",
                                "display": "Unknown"
                            }
                        ],
                        "text": "Unknown"
                    }
                ],
                "severity": "moderate"
            }
        ]
    }
    
  • {
      "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 AllergyIntolerance resource 'a47c7b0e-bbb4-42cd-bc4a-df259d148ea1'"
          }
        }
      ]
    }
    
  • curl --request PUT \
         --url 'https://fumage-example.canvasmedical.com/AllergyIntolerance/<id>' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json' \
         --header 'content-type: application/json' \
         --data '
    {
        "resourceType": "AllergyIntolerance",
         "extension": [
            {
                "url": "http://schemas.canvasmedical.com/fhir/extensions/note-id",
                "valueId": "2a8154d8-9420-4ab5-97f8-c2dae5a10af5",
            }
        ],
        "clinicalStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
                    "code": "active",
                    "display": "Active"
                }
            ],
            "text": "Active"
        },
        "verificationStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
                    "code": "entered-in-error",
                    "display": "Entered in Error"
                }
            ],
            "text": "Confirmed"
        },
        "type": "allergy",
        "code": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "2-15588",
                    "display": "Allergy Medicine"
                }
            ],
            "text": "Allergy Medicine"
        },
        "patient": {
            "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
        },
        "encounter": {
            "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc"
        },
        "onsetDateTime": "2023-06-15",
        "recorder": {
            "reference": "Practitioner/76428138e7644ce6b7eb426fdbbf2f39"
        },
        "lastOccurrence": "2023-06-17",
        "note": [
            {
                "text": "AllergyIntolerance note"
            }
        ],
        "reaction": [
            {
                "manifestation": [
                    {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
                                "code": "unknown",
                                "display": "Unknown"
                            }
                        ],
                        "text": "Unknown"
                    }
                ],
                "severity": "moderate"
            }
        ]
    }'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/AllergyIntolerance/<id>"
    
    headers = {
        "accept": "application/json",
        "Authorization": "Bearer <token>",
        "content-type": "application/json"
    }
    
    payload = {
        "resourceType": "AllergyIntolerance",
        "extension": [
            {
                "url": "http://schemas.canvasmedical.com/fhir/extensions/note-id",
                "valueId": "2a8154d8-9420-4ab5-97f8-c2dae5a10af5",
            }
        ],
        "clinicalStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
                    "code": "active",
                    "display": "Active"
                }
            ],
            "text": "Active"
        },
        "verificationStatus": {
            "coding": [
                {
                    "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
                    "code": "entered-in-error",
                    "display": "Entered in Error"
                }
            ],
            "text": "Confirmed"
        },
        "type": "allergy",
        "code": {
            "coding": [
                {
                    "system": "http://www.fdbhealth.com/",
                    "code": "2-15588",
                    "display": "Allergy Medicine"
                }
            ],
            "text": "Allergy Medicine"
        },
        "patient": {
            "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
        },
        "encounter": {
            "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc"
        },
        "onsetDateTime": "2023-06-15",
        "recorder": {
            "reference": "Practitioner/76428138e7644ce6b7eb426fdbbf2f39"
        },
        "lastOccurrence": "2023-06-17",
        "note": [
            {
                "text": "AllergyIntolerance note"
            }
        ],
        "reaction": [
            {
                "manifestation": [
                    {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
                                "code": "unknown",
                                "display": "Unknown"
                            }
                        ],
                        "text": "Unknown"
                    }
                ],
                "severity": "moderate"
            }
        ]
    }
    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 AllergyIntolerance 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/AllergyIntolerance?patient=Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0' \
         --header 'Authorization: Bearer <token>' \
         --header 'accept: application/json'
    
  • import requests
    
    url = "https://fumage-example.canvasmedical.com/AllergyIntolerance?patient=Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
    
    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": "/AllergyIntolerance?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0"
            },
            {
                "relation": "first",
                "url": "/AllergyIntolerance?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0"
            },
            {
                "relation": "last",
                "url": "/AllergyIntolerance?patient=Patient%2Fb8dfa97bdcdf4754bcd8197ca78ef0f0&_count=10&_offset=0"
            }
        ],
        "entry": [
            {
                "resource": {
                    "resourceType": "AllergyIntolerance",
                    "id": "3340c331-d446-4700-9c23-7959bd393f26",
                    "extension": [
                        {
                            "url": "http://schemas.canvasmedical.com/fhir/extensions/note-id",
                            "valueId": "2a8154d8-9420-4ab5-97f8-c2dae5a10af5",
                        }
                    ],
                    "clinicalStatus": {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
                                "code": "active",
                                "display": "Active"
                            }
                        ],
                        "text": "Active"
                    },
                    "verificationStatus": {
                        "coding": [
                            {
                                "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
                                "code": "confirmed",
                                "display": "Confirmed"
                            }
                        ],
                        "text": "Confirmed"
                    },
                    "type": "allergy",
                    "code": {
                        "coding": [
                            {
                                "system": "http://www.fdbhealth.com/",
                                "code": "2-15588",
                                "display": "Allergy Medicine"
                            }
                        ],
                        "text": "Allergy Medicine"
                    },
                    "patient": {
                        "reference": "Patient/b8dfa97bdcdf4754bcd8197ca78ef0f0"
                    },
                    "encounter": {
                        "reference": "Encounter/eae3c8a5-a129-4960-9715-fc26da30eccc"
                    },
                    "onsetDateTime": "2023-06-15",
                    "recorder": {
                        "reference": "Practitioner/76428138e7644ce6b7eb426fdbbf2f39"
                    },
                    "lastOccurrence": "2023-06-17",
                    "note": [
                        {
                            "text": "AllergyIntolerance note"
                        }
                    ],
                    "reaction": [
                        {
                            "manifestation": [
                                {
                                    "coding": [
                                        {
                                            "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
                                            "code": "unknown",
                                            "display": "Unknown"
                                        }
                                    ],
                                    "text": "Unknown"
                                }
                            ],
                            "severity": "moderate"
                        }
                    ]
                }
            }
        ]
    }
    
  • {
      "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"
          }
        }
      ]
    }