fhir-eswatini@0.1.1
This adaptor exports the following namespaced functions:
- datatypes.addExtension(resource, url, value)
- datatypes.cc()
- datatypes.coding(code, system)
- datatypes.composite(object, key, value)
- datatypes.concept(value, extra)
- datatypes.ext()
- datatypes.extension(url, value, props)
- datatypes.findExtension(obj, targetUrl, [path])
- datatypes.id()
- datatypes.identifier(id, ext, [system])
- datatypes.ref()
- datatypes.reference(ref)
- datatypes.setSystemMap()
- builders.appointment(props)
- builders.condition(props)
- builders.encounter(props)
- builders.episodeOfCare(props)
- builders.extension(type, props)
- builders.location(props)
- builders.medication(props)
- builders.medicationDispense(props)
- builders.medicationRequest(props)
- builders.observation(type, props)
- builders.organization(props)
- builders.patient(props)
- builders.practitioner(props)
- builders.procedure(props)
- builders.serviceRequest(type, props)
- builders.specimen(props)
datatypes
These functions belong to the datatypes namespace.
datatypes.addExtension
addExtension(resource, url, value)
Add an extension to a resource (or object).
An object will be created and added to an extension array on the provided resource.
The extension array will be set if it does not exist on the resource.
The value will be smartly written to the object, ie, valueDateTime or valueReference or valueString
| Param | Type | Description |
|---|---|---|
| resource | a FHIR resource object to add an extension too | |
| url | string | the URL to set for the extension |
| value | the value that the extension should contain |
datatypes.cc
cc()
Alias for b.concept()
datatypes.coding
coding(code, system)
Create a coding object { code, system }. Systems will be mapped using the system map.
| Param | Type | Description |
|---|---|---|
| code | string | the code value |
| system | string | URL to the system. Will be mapped using the system map. |
datatypes.composite
composite(object, key, value)
Write a value to the target object using a typed key
Ie, if key is value and the value is a date time string,
this function will write valueDateTime to the object.
This function is poorly named.
| Param | Type | Description |
|---|---|---|
| object | the object to write the composite key to | |
| key | string | the base key to use to write the value |
| value | some value to write to the object |
datatypes.concept
concept(value, extra)
Create a CodeableConcept. Codings can be coding objects or [code, system, extra] tuples (such as passed to b.coding()) Systems will be mapped with the system map
| Param | Type | Description |
|---|---|---|
| value | string | the value |
| extra | object | Extra properties to write to the coding |
Example: Create a codeableConcept
const myConcept = util.concept(['abc', 'http://moh.gov.et/fhir/hiv/identifier/SmartCareID'])
Example: Create a codeableConcept with text
const myConcept = util.concept('smart care id', ['abc', 'http://moh.gov.et/fhir/hiv/identifier/SmartCareID'])
datatypes.ext
ext()
Alias for b.extension()
datatypes.extension
extension(url, value, props)
Create an extension with a system and value
Values will be typemapped (ie, value -> valueString)
Optionally pass extra keys on the third argument
| Param | Type | Description |
|---|---|---|
| url | string | the URL to set for the extension |
| value | the value that the extension should contain | |
| props | extra props to add to the extension |
datatypes.findExtension
findExtension(obj, targetUrl, [path])
Find an extension with a given url in some array
| Param | Type | Description |
|---|---|---|
| obj | a fhir resource | |
| targetUrl | string | the extension URL you want to find |
| [path] | string | a path to extract from the resource. Optional. |
datatypes.id
id()
Alias for b.identifier()
datatypes.identifier
identifier(id, ext, [system])
Create an Identifier. Systems will be mapped against the system map. Pass extensions as extra arguments.
| Param | Type | Description |
|---|---|---|
| id | A string identifier, a FHIR identifier object, or an array of either. | |
| ext | Any other arguments will be treated as extensions | |
| [system] | string | the string system to use by default if |
datatypes.ref
ref()
Alias for b.reference()
datatypes.reference
reference(ref)
Create a reference object of the form { reference } If ref is an array, each item will be mapped and an array returned. If ref is a FHIR resource, a reference to it will be generated If ref is a string, it'll be treated as a reference id and returned as an object If ref is a valid FHIR reference, it'll just be returned.
| Param | Description |
|---|---|
| ref | the thing to generate a reference from |
datatypes.setSystemMap
setSystemMap()
Define a set of mapped system values.
Builder functions will use this mappings when they encounter them in system keys. Useful for setting shortcuts.
Example: Set shortcut system mappings
b.setSystemMap({
SmartCareID: 'http://moh.gov.et/fhir/hiv/identifier/SmartCareID'
});
create(builders.patient({ identifier: b.identifier('xyz', 'SmartCareId') }))
builders
These functions belong to the builders namespace.
builders.appointment
appointment(props)
Create a Appointment resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | External Ids for this item |
| [props.status] | string | proposed |
| [props.cancelationReason] | CodeableConcept | The coded reason for the appointment being cancelled |
| [props.serviceCategory] | CodeableConcept | A broad categorization of the service that is to be performed during this appointment |
| [props.serviceType] | CodeableConcept | The specific service that is to be performed during this appointment |
| [props.specialty] | CodeableConcept | The specialty of a practitioner that would be required to perform the service requested in this appointment |
| [props.appointmentType] | CodeableConcept | The style of appointment or patient that has been booked in the slot (not service type) |
| [props.reasonCode] | CodeableConcept | Coded reason this appointment is scheduled |
| [props.reasonReference] | Reference | Reason the appointment is to take place (resource) |
| [props.priority] | unsignedInt | Used to make informed decisions if needing to re-prioritize |
| [props.description] | string | Shown on a subject line in a meeting request, or appointment list |
| [props.supportingInformation] | Reference | Additional information to support the appointment |
| [props.start] | instant | When appointment is to take place |
| [props.end] | instant | When appointment is to conclude |
| [props.minutesDuration] | number | Can be less than start/end (e.g. estimate) |
| [props.slot] | Reference | The slots that this appointment is filling |
| [props.created] | dateTime | The date that this appointment was initially created |
| [props.comment] | string | Additional comments |
| [props.patientInstruction] | string | Detailed information and instructions for the patient |
| [props.basedOn] | Reference | The service request this appointment is allocated to assess |
| [props.participant] | BackboneElement | Participants involved in appointment |
| [props.requestedPeriod] | Period | Potential date/time interval(s) requested to allocate the appointment within |
builders.condition
condition(props)
Create a Condition resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | External Ids for this condition |
| [props.clinicalStatus] | CodeableConcept | active |
| [props.verificationStatus] | CodeableConcept | unconfirmed |
| [props.category] | CodeableConcept | problem-list-item |
| [props.severity] | CodeableConcept | Subjective severity of condition |
| [props.code] | CodeableConcept | Condition Identification |
| [props.bodySite] | CodeableConcept | Anatomical location, if relevant |
| [props.subject] | Reference | Who has the condition? |
| [props.encounter] | Reference | Encounter created as part of |
| [props.onset] | dateTime | Diagnosis date |
| [props.abatement] | dateTime | Age | Period | Range | string | When in resolution/remission |
| [props.recordedDate] | dateTime | Date record was first recorded |
| [props.recorder] | Reference | Who recorded the condition |
| [props.asserter] | Reference | Person who asserts this condition |
| [props.stage] | BackboneElement | Stage/grade, usually assessed formally |
| [props.evidence] | BackboneElement | Supporting evidence |
| [props.note] | Annotation | Additional information about the Condition |
builders.encounter
encounter(props)
Create a Encounter resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Identifier(s) by which this encounter is known |
| [props.status] | string | planned |
| [props.statusHistory] | BackboneElement | List of past encounter statuses |
| [props.class] | Coding | Department in which the encounter took place |
| [props.classHistory] | BackboneElement | List of past encounter classes |
| [props.type] | CodeableConcept | Specific type of encounter |
| [props.serviceType] | CodeableConcept | Specific type of service |
| [props.priority] | CodeableConcept | Indicates the urgency of the encounter |
| [props.subject] | Reference | Patient associated with the encounter |
| [props.episodeOfCare] | Reference | Episode(s) of care that this encounter should be recorded against |
| [props.basedOn] | Reference | The ServiceRequest that initiated this encounter |
| [props.participant] | BackboneElement | List of participants involved in the encounter |
| [props.appointment] | Reference | The appointment that scheduled this encounter |
| [props.period] | Period | The start and end time of the encounter |
| [props.length] | Duration | Quantity of time the encounter lasted (less time absent) |
| [props.reasonCode] | CodeableConcept | Coded reason the encounter takes place |
| [props.reasonReference] | Reference | Reason the encounter takes place (reference) |
| [props.diagnosis] | BackboneElement | The list of diagnosis relevant to this encounter |
| [props.account] | Reference | The set of accounts that may be used for billing for this Encounter |
| [props.hospitalization] | BackboneElement | Details about the admission to a healthcare service |
| [props.location] | BackboneElement | Encounter location |
| [props.serviceProvider] | Reference | Health facility responsible for the encounter |
| [props.partOf] | Reference | Another Encounter this encounter is part of |
builders.episodeOfCare
episodeOfCare(props)
Create a EpisodeOfCare resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Business Identifier(s) relevant for this EpisodeOfCare |
| [props.status] | string | planned |
| [props.statusHistory] | BackboneElement | Past list of status codes (the current status may be included to cover the start date of the status) |
| [props.type] | CodeableConcept | Episode of care classification |
| [props.diagnosis] | BackboneElement | The list of diagnosis relevant to this episode of care |
| [props.patient] | Reference | The patient who is the focus of this episode of care |
| [props.managingOrganization] | Reference | Organization that assumes care |
| [props.period] | Period | Start and end datest of the Episode of care |
| [props.referralRequest] | Reference | Originating Referral Request(s) |
| [props.careManager] | Reference | Care manager/care coordinator for the patient |
| [props.team] | Reference | Other practitioners facilitating this episode of care |
| [props.account] | Reference | The set of accounts that may be used for billing for this EpisodeOfCare |
builders.extension
extension(type, props)
Create a Extension resource.
| Param | Type | Description |
|---|---|---|
| type | string | A profile type: one of SzAuthorizerExtension,SzChiefdomExtension,SzInkhundlaExtension,SzLocationCodeExtension,SzReferralRecipientExtension,SzRegistrationDate,SzTestingLabExtension |
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Unique id for inter-element referencing |
| [props.extension] | Extension | Extension |
| [props.url] | string | identifies the meaning of the extension |
| [props.value] | Reference | Value of extension |
builders.location
location(props)
Create a Location resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Unique code or number identifying the location to its users |
| [props.status] | string | active |
| [props.operationalStatus] | Coding | The operational status of the location (typically only for a bed/room) |
| [props.name] | string | Location Name |
| [props.alias] | string | A list of alternate names that the location is known as, or was known as, in the past |
| [props.description] | string | Additional details about the location that could be displayed as further information to identify the location beyond its name |
| [props.mode] | string | instance |
| [props.type] | CodeableConcept | Location Type |
| [props.telecom] | ContactPoint | Contact details of the location |
| [props.address] | Address | Physical location |
| [props.physicalType] | CodeableConcept | Physical form of the location |
| [props.position] | BackboneElement | The absolute geographic location |
| [props.managingOrganization] | Reference | Organization responsible for provisioning and upkeep |
| [props.partOf] | Reference | Another Location this one is physically a part of |
| [props.hoursOfOperation] | BackboneElement | What days/times during a week is this location usually open |
| [props.availabilityExceptions] | string | Description of availability exceptions |
| [props.endpoint] | Reference | Technical endpoints providing access to services operated for the location |
builders.medication
medication(props)
Create a Medication resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Business identifier for this medication |
| [props.code] | CodeableConcept | ELMIS Product Code |
| [props.status] | string | active |
| [props.manufacturer] | Reference | Manufacturer of the item |
| [props.form] | CodeableConcept | powder |
| [props.amount] | Ratio | Amount of drug in package |
| [props.ingredient] | BackboneElement | Active or inactive ingredient |
| [props.batch] | BackboneElement | Details about packaged medications |
builders.medicationDispense
medicationDispense(props)
Create a MedicationDispense resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | External identifier |
| [props.partOf] | Reference | Event that dispense is part of |
| [props.status] | string | preparation |
| [props.statusReason] | CodeableConcept | Reference | Why a dispense was not performed |
| [props.category] | CodeableConcept | Type of medication dispense |
| [props.medication] | CodeableConcept | Supplied Medication |
| [props.subject] | Reference | Who the dispense is for |
| [props.context] | Reference | Encounter / Episode associated with event |
| [props.supportingInformation] | Reference | Information that supports the dispensing of the medication |
| [props.performer] | BackboneElement | Dispensing Practitioner |
| [props.location] | Reference | Where the dispense occurred |
| [props.authorizingPrescription] | Reference | Medication order that authorizes the dispense |
| [props.type] | CodeableConcept | Trial fill, partial fill, emergency fill, etc. |
| [props.quantity] | Quantity | Amount dispensed |
| [props.daysSupply] | Quantity | Amount of medication expressed as a timing amount |
| [props.whenPrepared] | dateTime | When product was packaged and reviewed |
| [props.whenHandedOver] | dateTime | When product was given out |
| [props.destination] | Reference | Where the medication was sent |
| [props.receiver] | Reference | Who collected the medication |
| [props.note] | Annotation | Information about the dispense |
| [props.dosageInstruction] | Dosage | How the medication is to be used by the patient or administered by the caregiver |
| [props.substitution] | BackboneElement | Whether a substitution was performed on the dispense |
| [props.detectedIssue] | Reference | Clinical issue with action |
| [props.eventHistory] | Reference | A list of relevant lifecycle events |
builders.medicationRequest
medicationRequest(props)
Create a MedicationRequest resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | External ids for this request |
| [props.status] | string | active |
| [props.statusReason] | CodeableConcept | Reason for current status |
| [props.intent] | string | proposal |
| [props.category] | CodeableConcept | Type of medication usage |
| [props.priority] | string | routine |
| [props.doNotPerform] | boolean | True if request is prohibiting action |
| [props.reported] | boolean | Reference | Reported rather than primary record |
| [props.medication] | CodeableConcept | Medication to be taken |
| [props.subject] | Reference | Who or group medication request is for |
| [props.encounter] | Reference | Encounter created as part of encounter/admission/stay |
| [props.supportingInformation] | Reference | Information to support ordering of the medication |
| [props.authoredOn] | dateTime | Medication Request Date |
| [props.requester] | Reference | Who/What requested the Request |
| [props.performer] | Reference | Intended performer of administration |
| [props.performerType] | CodeableConcept | Desired kind of performer of the medication administration |
| [props.recorder] | Reference | Person who entered the request |
| [props.reasonCode] | CodeableConcept | Reason or indication for ordering or not ordering the medication |
| [props.reasonReference] | Reference | Condition or observation that supports why the prescription is being written |
| [props.instantiatesCanonical] | canonical | Instantiates FHIR protocol or definition |
| [props.instantiatesUri] | string | Instantiates external protocol or definition |
| [props.basedOn] | Reference | What request fulfills |
| [props.groupIdentifier] | Identifier | Composite request this is part of |
| [props.courseOfTherapyType] | CodeableConcept | Overall pattern of medication administration |
| [props.insurance] | Reference | Associated insurance coverage |
| [props.note] | Annotation | Information about the prescription |
| [props.dosageInstruction] | Dosage | Dosage Instruction |
| [props.dispenseRequest] | BackboneElement | Medication supply authorization |
| [props.substitution] | BackboneElement | Any restrictions on medication substitution |
| [props.priorPrescription] | Reference | An order/prescription that is being replaced |
| [props.detectedIssue] | Reference | Clinical Issue with action |
| [props.eventHistory] | Reference | A list of events of interest in the lifecycle |
builders.observation
observation(type, props)
Create a Observation resource.
| Param | Type | Description |
|---|---|---|
| type | string | A profile type: one of SzCauseOfDeath,SzClinicalObservation,SzLabResult,SzMannerOfDeath,SzVitalSigns |
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Business Identifier for observation |
| [props.basedOn] | Reference | Fulfills plan, proposal or order |
| [props.partOf] | Reference | Part of referenced event |
| [props.status] | string | registered |
| [props.category] | CodeableConcept | Classification of type of observation |
| [props.code] | CodeableConcept | Cause of death |
| [props.subject] | Reference | The decedent |
| [props.focus] | Reference | What the observation is about, when it is not about the subject of record |
| [props.encounter] | Reference | Healthcare event during which this observation is made |
| [props.effective] | dateTime | Period | Timing | instant | Clinically relevant time/time-period for observation |
| [props.issued] | instant | Date/Time this version was made available |
| [props.performer] | Reference | Cause of death certifier (coroner or medical examiner) |
| [props.value] | CodeableConcept | Actual result |
| [props.dataAbsentReason] | CodeableConcept | Why the result is missing |
| [props.interpretation] | CodeableConcept | High, low, normal, etc. |
| [props.note] | Annotation | Comments about the observation |
| [props.bodySite] | CodeableConcept | Observed body part |
| [props.method] | CodeableConcept | How it was done |
| [props.specimen] | Reference | Specimen used for this observation |
| [props.device] | Reference | (Measurement) Device |
| [props.referenceRange] | BackboneElement | Provides guide for interpretation |
| [props.hasMember] | Reference | Related resource that belongs to the Observation group |
| [props.derivedFrom] | Reference | Related measurements the observation is made from |
| [props.component] | BackboneElement | Cause of death time interval for Intermediate, Intermediate I, Intermediat II, Underlying |
builders.organization
organization(props)
Create a Organization resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Identifies this organization across multiple systems |
| [props.active] | boolean | Whether the organization's record is still in active use |
| [props.type] | CodeableConcept | Organization Type |
| [props.name] | string | Organization' name |
| [props.alias] | string | A list of alternate names that the organization is known as, or was known as in the past |
| [props.telecom] | ContactPoint | A contact detail for the organization |
| [props.address] | Address | An address for the organization |
| [props.partOf] | Reference | The organization of which this organization forms a part |
| [props.contact] | BackboneElement | Contact for the organization for a certain purpose |
| [props.endpoint] | Reference | Technical endpoints providing access to services operated for the organization |
builders.patient
patient(props)
Create a Patient resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Date the patient was registered |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Patient's Identification Number |
| [props.active] | boolean | Whether this patient's record is in active use |
| [props.name] | HumanName | Patient's name |
| [props.telecom] | ContactPoint | A contact detail for the individual |
| [props.gender] | string | Sex at birth: male |
| [props.birthDate] | date | Date of birth: YYYY-MM-DD |
| [props.deceased] | boolean | dateTime | Indicates if the individual is deceased or not |
| [props.address] | Address | An address for the individual |
| [props.maritalStatus] | CodeableConcept | Marital (civil) status of a patient |
| [props.multipleBirth] | boolean | integer | Whether patient is part of a multiple birth |
| [props.photo] | Attachment | Image of the patient |
| [props.contact] | BackboneElement | A contact party (e.g. guardian, partner, friend) for the patient |
| [props.communication] | BackboneElement | A language which may be used to communicate with the patient about his or her health |
| [props.generalPractitioner] | Reference | Patient's nominated primary care provider |
| [props.managingOrganization] | Reference | Organization that is the custodian of the patient record |
| [props.link] | BackboneElement | Link to another patient resource that concerns the same actual person |
builders.practitioner
practitioner(props)
Create a Practitioner resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | An identifier for the person as this agent |
| [props.active] | boolean | Whether this practitioner's record is in active use |
| [props.name] | HumanName | Practitioner's name |
| [props.telecom] | ContactPoint | A contact detail for the practitioner (that apply to all roles) |
| [props.address] | Address | Address(es) of the practitioner that are not role specific (typically home address) |
| [props.gender] | string | Sex at birth: male |
| [props.birthDate] | date | The date on which the practitioner was born |
| [props.photo] | Attachment | Image of the person |
| [props.qualification] | BackboneElement | Certification, licenses, or training pertaining to the provision of care |
| [props.communication] | CodeableConcept | A language the practitioner can use in patient communication |
builders.procedure
procedure(props)
Create a Procedure resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | External Identifiers for this procedure |
| [props.instantiatesCanonical] | canonical | Instantiates FHIR protocol or definition |
| [props.instantiatesUri] | string | Instantiates external protocol or definition |
| [props.basedOn] | Reference | A request for this procedure |
| [props.partOf] | Reference | Part of referenced event |
| [props.status] | string | preparation |
| [props.statusReason] | CodeableConcept | Reason for current status |
| [props.category] | CodeableConcept | Classification of the procedure |
| [props.code] | CodeableConcept | Procedure Code |
| [props.subject] | Reference | Who the procedure was performed on |
| [props.encounter] | Reference | Encounter created as part of |
| [props.performed] | dateTime | Period | string | Age | Range | When the procedure was performed |
| [props.recorder] | Reference | Who recorded the procedure |
| [props.asserter] | Reference | Person who asserts this procedure |
| [props.performer] | BackboneElement | The people who performed the procedure |
| [props.location] | Reference | Where the procedure happened |
| [props.reasonCode] | CodeableConcept | Coded reason procedure performed |
| [props.reasonReference] | Reference | The justification that the procedure was performed |
| [props.bodySite] | CodeableConcept | Target body sites |
| [props.outcome] | CodeableConcept | The result of procedure |
| [props.report] | Reference | Any report resulting from the procedure |
| [props.complication] | CodeableConcept | Complication following the procedure |
| [props.complicationDetail] | Reference | A condition that is a result of the procedure |
| [props.followUp] | CodeableConcept | Instructions for follow up |
| [props.note] | Annotation | Additional information about the procedure |
| [props.focalDevice] | BackboneElement | Manipulated, implanted, or removed device |
| [props.usedReference] | Reference | Items used during procedure |
| [props.usedCode] | CodeableConcept | Coded items used during the procedure |
builders.serviceRequest
serviceRequest(type, props)
Create a ServiceRequest resource.
| Param | Type | Description |
|---|---|---|
| type | string | A profile type: one of SzLabRequest,SzReferral |
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | Identifiers assigned to this order |
| [props.instantiatesCanonical] | canonical | Instantiates FHIR protocol or definition |
| [props.instantiatesUri] | string | Instantiates external protocol or definition |
| [props.basedOn] | Reference | What request fulfills |
| [props.replaces] | Reference | What request replaces |
| [props.requisition] | Identifier | Composite Request ID |
| [props.status] | string | draft |
| [props.intent] | string | proposal |
| [props.category] | CodeableConcept | Type of service request |
| [props.priority] | string | routine |
| [props.doNotPerform] | boolean | True if service/procedure should not be performed |
| [props.code] | CodeableConcept | Local test code |
| [props.orderDetail] | CodeableConcept | Additional order information |
| [props.quantity] | Quantity | Ratio | Range | Service amount |
| [props.subject] | Reference | Patient's information |
| [props.encounter] | Reference | Encounter information |
| [props.occurrence] | dateTime | Period | Timing | When service should occur |
| [props.asNeeded] | boolean | CodeableConcept | Preconditions for service |
| [props.authoredOn] | dateTime | Date request signed |
| [props.requester] | Reference | Who/what is requesting service |
| [props.performerType] | CodeableConcept | Performer role |
| [props.performer] | Reference | Requested performer |
| [props.locationCode] | CodeableConcept | Requested location |
| [props.locationReference] | Reference | Requested location |
| [props.reasonCode] | CodeableConcept | Explanation/Justification for procedure or service |
| [props.reasonReference] | Reference | Explanation/Justification for service or service |
| [props.insurance] | Reference | Associated insurance coverage |
| [props.supportingInfo] | Reference | Additional clinical information |
| [props.specimen] | Reference | Lab test specimen |
| [props.bodySite] | CodeableConcept | Location on Body |
| [props.note] | Annotation | Comments |
| [props.patientInstruction] | string | Patient or consumer-oriented instructions |
| [props.relevantHistory] | Reference | Request provenance |
builders.specimen
specimen(props)
Create a Specimen resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.id] | string | Logical id of this artifact |
| [props.meta] | Meta | Metadata about the resource |
| [props.implicitRules] | string | A set of rules under which this content was created |
| [props.language] | string | Language of the resource content |
| [props.text] | Narrative | Text summary of the resource, for human interpretation |
| [props.contained] | Resource | Contained, inline Resources |
| [props.extension] | Extension | Additional content defined by implementations |
| [props.modifierExtension] | Extension | Extensions that cannot be ignored |
| [props.identifier] | Identifier | External Identifier |
| [props.accessionIdentifier] | Identifier | Identifier assigned by the lab |
| [props.status] | string | available |
| [props.type] | CodeableConcept | Type of specimen being collected |
| [props.subject] | Reference | Patient associated with the specimen being collected |
| [props.receivedTime] | dateTime | The time when specimen was received for processing |
| [props.parent] | Reference | Specimen from which this specimen originated |
| [props.request] | Reference | Why the specimen was collected |
| [props.collection] | BackboneElement | Specimen collection information |
| [props.processing] | BackboneElement | Processing and processing step details |
| [props.container] | BackboneElement | Direct container of specimen (tube/slide, etc.) |
| [props.condition] | CodeableConcept | State of the specimen |
| [props.note] | Annotation | Comments |