This site uses cookies to offer you a better browsing experience.
Learn more.
Post Data
Any FHIR resource designated read/write in the reference documentation (see https://[YOUR_FHIR_ENDPOINT]/documentation) will support the POST operation. Data are posted in a Bundle with type transaction. It is important to provide relevant patient demographics and identifiers to enable matching to patients which may already exist on the FHIR server.
To write/create/update FHIR patient data, POST a Bundle with type transaction. Each Bundle contains an entry array of resources.
For example, to write a weight observation, POST a payload to the base URL https://[YOUR_FHIR_ENDPOINT]/ (typically .../api/fhir; ensure use of the intended endpoint version, eg DSTU2 versus R4):
Note
The Patient must have one identifier without a system, e.g.:
"identifier": [ {"value": "6995d608-8544-ea11-815b-0a69c1b3225b"} ],
Warning
This identifier uniquely identifies the patient. If you POST again with the same identifier, data for that patient will be modified or added. If you choose a different identifier, a new patient will be created. If the identifier is not unique, you risk unintentionally modifying data for an existing patient.
A successful response would indicate that two resources have been created ("status": "201") and specify their complete FHIR URLs:
Note
If using the FHIR request explorer to POST a Bundle, do not select a ‘Resource’ (leave blank) and paste the payload in the Data section.
Specifying Patient Demographics and Identifiers
It is recommended that each Bundle always contains a Patient resource with any available demographic information to facilitate patient matching to existing data when applicable.
Patient demographic identifiers (e.g. medical record numbers, patient IDs, social security numbers, etc.) are specified as FHIR identifiers, mapping their type to FHIR system URIs. A listing of system URIs can be found at https://[YOUR_FHIR_ENDPOINT]/documentation.
For example, to set an SSN and MemberID:
Specifying Full URLs
The ”fullurl” elements are arbitrary strings that must be unique within the transaction. They are used to specify references between different resource in the transaction - so in the example above the patient has
"fullUrl": "patient1",
and its observation has:
"subject": {"reference": "patient1"},
Full URLs also match each transaction resource with its corresponding response:
Special Case: Labs in DiagnosticReports
FHIR labs are Observation resources with laboratory category in the http://hl7.org/fhir/observation-category system:
Stand-alone labs are not supported, they must always be posted as part of a lab report - that is a FHIR DiagnosticReport with LAB category in the http://hl7.org/fhir/v2/0074 system.
Here is a complete transaction to create a lab report with a single WBC value: