Skip to main content

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

ParamTypeDescription
resourcea FHIR resource object to add an extension too
urlstringthe URL to set for the extension
valuethe 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.

ParamTypeDescription
codestringthe code value
systemstringURL 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.

ParamTypeDescription
objectthe object to write the composite key to
keystringthe base key to use to write the value
valuesome 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

ParamTypeDescription
valuestringthe value
extraobjectExtra 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

ParamTypeDescription
urlstringthe URL to set for the extension
valuethe value that the extension should contain
propsextra props to add to the extension

datatypes.findExtension

findExtension(obj, targetUrl, [path])

Find an extension with a given url in some array

ParamTypeDescription
obja fhir resource
targetUrlstringthe extension URL you want to find
[path]stringa 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.

ParamTypeDescription
idA string identifier, a FHIR identifier object, or an array of either.
extAny other arguments will be treated as extensions
[system]stringthe 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.

ParamDescription
refthe 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.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierExternal Ids for this item
[props.status]stringproposed
[props.cancelationReason]CodeableConceptThe coded reason for the appointment being cancelled
[props.serviceCategory]CodeableConceptA broad categorization of the service that is to be performed during this appointment
[props.serviceType]CodeableConceptThe specific service that is to be performed during this appointment
[props.specialty]CodeableConceptThe specialty of a practitioner that would be required to perform the service requested in this appointment
[props.appointmentType]CodeableConceptThe style of appointment or patient that has been booked in the slot (not service type)
[props.reasonCode]CodeableConceptCoded reason this appointment is scheduled
[props.reasonReference]ReferenceReason the appointment is to take place (resource)
[props.priority]unsignedIntUsed to make informed decisions if needing to re-prioritize
[props.description]stringShown on a subject line in a meeting request, or appointment list
[props.supportingInformation]ReferenceAdditional information to support the appointment
[props.start]instantWhen appointment is to take place
[props.end]instantWhen appointment is to conclude
[props.minutesDuration]numberCan be less than start/end (e.g. estimate)
[props.slot]ReferenceThe slots that this appointment is filling
[props.created]dateTimeThe date that this appointment was initially created
[props.comment]stringAdditional comments
[props.patientInstruction]stringDetailed information and instructions for the patient
[props.basedOn]ReferenceThe service request this appointment is allocated to assess
[props.participant]BackboneElementParticipants involved in appointment
[props.requestedPeriod]PeriodPotential date/time interval(s) requested to allocate the appointment within

builders.condition

condition(props)

Create a Condition resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierExternal Ids for this condition
[props.clinicalStatus]CodeableConceptactive
[props.verificationStatus]CodeableConceptunconfirmed
[props.category]CodeableConceptproblem-list-item
[props.severity]CodeableConceptSubjective severity of condition
[props.code]CodeableConceptCondition Identification
[props.bodySite]CodeableConceptAnatomical location, if relevant
[props.subject]ReferenceWho has the condition?
[props.encounter]ReferenceEncounter created as part of
[props.onset]dateTimeDiagnosis date
[props.abatement]dateTime | Age | Period | Range | stringWhen in resolution/remission
[props.recordedDate]dateTimeDate record was first recorded
[props.recorder]ReferenceWho recorded the condition
[props.asserter]ReferencePerson who asserts this condition
[props.stage]BackboneElementStage/grade, usually assessed formally
[props.evidence]BackboneElementSupporting evidence
[props.note]AnnotationAdditional information about the Condition

builders.encounter

encounter(props)

Create a Encounter resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierIdentifier(s) by which this encounter is known
[props.status]stringplanned
[props.statusHistory]BackboneElementList of past encounter statuses
[props.class]CodingDepartment in which the encounter took place
[props.classHistory]BackboneElementList of past encounter classes
[props.type]CodeableConceptSpecific type of encounter
[props.serviceType]CodeableConceptSpecific type of service
[props.priority]CodeableConceptIndicates the urgency of the encounter
[props.subject]ReferencePatient associated with the encounter
[props.episodeOfCare]ReferenceEpisode(s) of care that this encounter should be recorded against
[props.basedOn]ReferenceThe ServiceRequest that initiated this encounter
[props.participant]BackboneElementList of participants involved in the encounter
[props.appointment]ReferenceThe appointment that scheduled this encounter
[props.period]PeriodThe start and end time of the encounter
[props.length]DurationQuantity of time the encounter lasted (less time absent)
[props.reasonCode]CodeableConceptCoded reason the encounter takes place
[props.reasonReference]ReferenceReason the encounter takes place (reference)
[props.diagnosis]BackboneElementThe list of diagnosis relevant to this encounter
[props.account]ReferenceThe set of accounts that may be used for billing for this Encounter
[props.hospitalization]BackboneElementDetails about the admission to a healthcare service
[props.location]BackboneElementEncounter location
[props.serviceProvider]ReferenceHealth facility responsible for the encounter
[props.partOf]ReferenceAnother Encounter this encounter is part of

builders.episodeOfCare

episodeOfCare(props)

Create a EpisodeOfCare resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierBusiness Identifier(s) relevant for this EpisodeOfCare
[props.status]stringplanned
[props.statusHistory]BackboneElementPast list of status codes (the current status may be included to cover the start date of the status)
[props.type]CodeableConceptEpisode of care classification
[props.diagnosis]BackboneElementThe list of diagnosis relevant to this episode of care
[props.patient]ReferenceThe patient who is the focus of this episode of care
[props.managingOrganization]ReferenceOrganization that assumes care
[props.period]PeriodStart and end datest of the Episode of care
[props.referralRequest]ReferenceOriginating Referral Request(s)
[props.careManager]ReferenceCare manager/care coordinator for the patient
[props.team]ReferenceOther practitioners facilitating this episode of care
[props.account]ReferenceThe set of accounts that may be used for billing for this EpisodeOfCare

builders.extension

extension(type, props)

Create a Extension resource.

ParamTypeDescription
typestringA profile type: one of SzAuthorizerExtension,SzChiefdomExtension,SzInkhundlaExtension,SzLocationCodeExtension,SzReferralRecipientExtension,SzRegistrationDate,SzTestingLabExtension
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringUnique id for inter-element referencing
[props.extension]ExtensionExtension
[props.url]stringidentifies the meaning of the extension
[props.value]ReferenceValue of extension

builders.location

location(props)

Create a Location resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierUnique code or number identifying the location to its users
[props.status]stringactive
[props.operationalStatus]CodingThe operational status of the location (typically only for a bed/room)
[props.name]stringLocation Name
[props.alias]stringA list of alternate names that the location is known as, or was known as, in the past
[props.description]stringAdditional details about the location that could be displayed as further information to identify the location beyond its name
[props.mode]stringinstance
[props.type]CodeableConceptLocation Type
[props.telecom]ContactPointContact details of the location
[props.address]AddressPhysical location
[props.physicalType]CodeableConceptPhysical form of the location
[props.position]BackboneElementThe absolute geographic location
[props.managingOrganization]ReferenceOrganization responsible for provisioning and upkeep
[props.partOf]ReferenceAnother Location this one is physically a part of
[props.hoursOfOperation]BackboneElementWhat days/times during a week is this location usually open
[props.availabilityExceptions]stringDescription of availability exceptions
[props.endpoint]ReferenceTechnical endpoints providing access to services operated for the location

builders.medication

medication(props)

Create a Medication resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierBusiness identifier for this medication
[props.code]CodeableConceptELMIS Product Code
[props.status]stringactive
[props.manufacturer]ReferenceManufacturer of the item
[props.form]CodeableConceptpowder
[props.amount]RatioAmount of drug in package
[props.ingredient]BackboneElementActive or inactive ingredient
[props.batch]BackboneElementDetails about packaged medications

builders.medicationDispense

medicationDispense(props)

Create a MedicationDispense resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierExternal identifier
[props.partOf]ReferenceEvent that dispense is part of
[props.status]stringpreparation
[props.statusReason]CodeableConcept | ReferenceWhy a dispense was not performed
[props.category]CodeableConceptType of medication dispense
[props.medication]CodeableConceptSupplied Medication
[props.subject]ReferenceWho the dispense is for
[props.context]ReferenceEncounter / Episode associated with event
[props.supportingInformation]ReferenceInformation that supports the dispensing of the medication
[props.performer]BackboneElementDispensing Practitioner
[props.location]ReferenceWhere the dispense occurred
[props.authorizingPrescription]ReferenceMedication order that authorizes the dispense
[props.type]CodeableConceptTrial fill, partial fill, emergency fill, etc.
[props.quantity]QuantityAmount dispensed
[props.daysSupply]QuantityAmount of medication expressed as a timing amount
[props.whenPrepared]dateTimeWhen product was packaged and reviewed
[props.whenHandedOver]dateTimeWhen product was given out
[props.destination]ReferenceWhere the medication was sent
[props.receiver]ReferenceWho collected the medication
[props.note]AnnotationInformation about the dispense
[props.dosageInstruction]DosageHow the medication is to be used by the patient or administered by the caregiver
[props.substitution]BackboneElementWhether a substitution was performed on the dispense
[props.detectedIssue]ReferenceClinical issue with action
[props.eventHistory]ReferenceA list of relevant lifecycle events

builders.medicationRequest

medicationRequest(props)

Create a MedicationRequest resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierExternal ids for this request
[props.status]stringactive
[props.statusReason]CodeableConceptReason for current status
[props.intent]stringproposal
[props.category]CodeableConceptType of medication usage
[props.priority]stringroutine
[props.doNotPerform]booleanTrue if request is prohibiting action
[props.reported]boolean | ReferenceReported rather than primary record
[props.medication]CodeableConceptMedication to be taken
[props.subject]ReferenceWho or group medication request is for
[props.encounter]ReferenceEncounter created as part of encounter/admission/stay
[props.supportingInformation]ReferenceInformation to support ordering of the medication
[props.authoredOn]dateTimeMedication Request Date
[props.requester]ReferenceWho/What requested the Request
[props.performer]ReferenceIntended performer of administration
[props.performerType]CodeableConceptDesired kind of performer of the medication administration
[props.recorder]ReferencePerson who entered the request
[props.reasonCode]CodeableConceptReason or indication for ordering or not ordering the medication
[props.reasonReference]ReferenceCondition or observation that supports why the prescription is being written
[props.instantiatesCanonical]canonicalInstantiates FHIR protocol or definition
[props.instantiatesUri]stringInstantiates external protocol or definition
[props.basedOn]ReferenceWhat request fulfills
[props.groupIdentifier]IdentifierComposite request this is part of
[props.courseOfTherapyType]CodeableConceptOverall pattern of medication administration
[props.insurance]ReferenceAssociated insurance coverage
[props.note]AnnotationInformation about the prescription
[props.dosageInstruction]DosageDosage Instruction
[props.dispenseRequest]BackboneElementMedication supply authorization
[props.substitution]BackboneElementAny restrictions on medication substitution
[props.priorPrescription]ReferenceAn order/prescription that is being replaced
[props.detectedIssue]ReferenceClinical Issue with action
[props.eventHistory]ReferenceA list of events of interest in the lifecycle

builders.observation

observation(type, props)

Create a Observation resource.

ParamTypeDescription
typestringA profile type: one of SzCauseOfDeath,SzClinicalObservation,SzLabResult,SzMannerOfDeath,SzVitalSigns
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierBusiness Identifier for observation
[props.basedOn]ReferenceFulfills plan, proposal or order
[props.partOf]ReferencePart of referenced event
[props.status]stringregistered
[props.category]CodeableConceptClassification of type of observation
[props.code]CodeableConceptCause of death
[props.subject]ReferenceThe decedent
[props.focus]ReferenceWhat the observation is about, when it is not about the subject of record
[props.encounter]ReferenceHealthcare event during which this observation is made
[props.effective]dateTime | Period | Timing | instantClinically relevant time/time-period for observation
[props.issued]instantDate/Time this version was made available
[props.performer]ReferenceCause of death certifier (coroner or medical examiner)
[props.value]CodeableConceptActual result
[props.dataAbsentReason]CodeableConceptWhy the result is missing
[props.interpretation]CodeableConceptHigh, low, normal, etc.
[props.note]AnnotationComments about the observation
[props.bodySite]CodeableConceptObserved body part
[props.method]CodeableConceptHow it was done
[props.specimen]ReferenceSpecimen used for this observation
[props.device]Reference(Measurement) Device
[props.referenceRange]BackboneElementProvides guide for interpretation
[props.hasMember]ReferenceRelated resource that belongs to the Observation group
[props.derivedFrom]ReferenceRelated measurements the observation is made from
[props.component]BackboneElementCause of death time interval for Intermediate, Intermediate I, Intermediat II, Underlying

builders.organization

organization(props)

Create a Organization resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierIdentifies this organization across multiple systems
[props.active]booleanWhether the organization's record is still in active use
[props.type]CodeableConceptOrganization Type
[props.name]stringOrganization' name
[props.alias]stringA list of alternate names that the organization is known as, or was known as in the past
[props.telecom]ContactPointA contact detail for the organization
[props.address]AddressAn address for the organization
[props.partOf]ReferenceThe organization of which this organization forms a part
[props.contact]BackboneElementContact for the organization for a certain purpose
[props.endpoint]ReferenceTechnical endpoints providing access to services operated for the organization

builders.patient

patient(props)

Create a Patient resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionDate the patient was registered
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierPatient's Identification Number
[props.active]booleanWhether this patient's record is in active use
[props.name]HumanNamePatient's name
[props.telecom]ContactPointA contact detail for the individual
[props.gender]stringSex at birth: male
[props.birthDate]dateDate of birth: YYYY-MM-DD
[props.deceased]boolean | dateTimeIndicates if the individual is deceased or not
[props.address]AddressAn address for the individual
[props.maritalStatus]CodeableConceptMarital (civil) status of a patient
[props.multipleBirth]boolean | integerWhether patient is part of a multiple birth
[props.photo]AttachmentImage of the patient
[props.contact]BackboneElementA contact party (e.g. guardian, partner, friend) for the patient
[props.communication]BackboneElementA language which may be used to communicate with the patient about his or her health
[props.generalPractitioner]ReferencePatient's nominated primary care provider
[props.managingOrganization]ReferenceOrganization that is the custodian of the patient record
[props.link]BackboneElementLink to another patient resource that concerns the same actual person

builders.practitioner

practitioner(props)

Create a Practitioner resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierAn identifier for the person as this agent
[props.active]booleanWhether this practitioner's record is in active use
[props.name]HumanNamePractitioner's name
[props.telecom]ContactPointA contact detail for the practitioner (that apply to all roles)
[props.address]AddressAddress(es) of the practitioner that are not role specific (typically home address)
[props.gender]stringSex at birth: male
[props.birthDate]dateThe date on which the practitioner was born
[props.photo]AttachmentImage of the person
[props.qualification]BackboneElementCertification, licenses, or training pertaining to the provision of care
[props.communication]CodeableConceptA language the practitioner can use in patient communication

builders.procedure

procedure(props)

Create a Procedure resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierExternal Identifiers for this procedure
[props.instantiatesCanonical]canonicalInstantiates FHIR protocol or definition
[props.instantiatesUri]stringInstantiates external protocol or definition
[props.basedOn]ReferenceA request for this procedure
[props.partOf]ReferencePart of referenced event
[props.status]stringpreparation
[props.statusReason]CodeableConceptReason for current status
[props.category]CodeableConceptClassification of the procedure
[props.code]CodeableConceptProcedure Code
[props.subject]ReferenceWho the procedure was performed on
[props.encounter]ReferenceEncounter created as part of
[props.performed]dateTime | Period | string | Age | RangeWhen the procedure was performed
[props.recorder]ReferenceWho recorded the procedure
[props.asserter]ReferencePerson who asserts this procedure
[props.performer]BackboneElementThe people who performed the procedure
[props.location]ReferenceWhere the procedure happened
[props.reasonCode]CodeableConceptCoded reason procedure performed
[props.reasonReference]ReferenceThe justification that the procedure was performed
[props.bodySite]CodeableConceptTarget body sites
[props.outcome]CodeableConceptThe result of procedure
[props.report]ReferenceAny report resulting from the procedure
[props.complication]CodeableConceptComplication following the procedure
[props.complicationDetail]ReferenceA condition that is a result of the procedure
[props.followUp]CodeableConceptInstructions for follow up
[props.note]AnnotationAdditional information about the procedure
[props.focalDevice]BackboneElementManipulated, implanted, or removed device
[props.usedReference]ReferenceItems used during procedure
[props.usedCode]CodeableConceptCoded items used during the procedure

builders.serviceRequest

serviceRequest(type, props)

Create a ServiceRequest resource.

ParamTypeDescription
typestringA profile type: one of SzLabRequest,SzReferral
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierIdentifiers assigned to this order
[props.instantiatesCanonical]canonicalInstantiates FHIR protocol or definition
[props.instantiatesUri]stringInstantiates external protocol or definition
[props.basedOn]ReferenceWhat request fulfills
[props.replaces]ReferenceWhat request replaces
[props.requisition]IdentifierComposite Request ID
[props.status]stringdraft
[props.intent]stringproposal
[props.category]CodeableConceptType of service request
[props.priority]stringroutine
[props.doNotPerform]booleanTrue if service/procedure should not be performed
[props.code]CodeableConceptLocal test code
[props.orderDetail]CodeableConceptAdditional order information
[props.quantity]Quantity | Ratio | RangeService amount
[props.subject]ReferencePatient's information
[props.encounter]ReferenceEncounter information
[props.occurrence]dateTime | Period | TimingWhen service should occur
[props.asNeeded]boolean | CodeableConceptPreconditions for service
[props.authoredOn]dateTimeDate request signed
[props.requester]ReferenceWho/what is requesting service
[props.performerType]CodeableConceptPerformer role
[props.performer]ReferenceRequested performer
[props.locationCode]CodeableConceptRequested location
[props.locationReference]ReferenceRequested location
[props.reasonCode]CodeableConceptExplanation/Justification for procedure or service
[props.reasonReference]ReferenceExplanation/Justification for service or service
[props.insurance]ReferenceAssociated insurance coverage
[props.supportingInfo]ReferenceAdditional clinical information
[props.specimen]ReferenceLab test specimen
[props.bodySite]CodeableConceptLocation on Body
[props.note]AnnotationComments
[props.patientInstruction]stringPatient or consumer-oriented instructions
[props.relevantHistory]ReferenceRequest provenance

builders.specimen

specimen(props)

Create a Specimen resource.

ParamTypeDescription
propsobjectProperties to apply to the resource (includes common and custom properties).
[props.id]stringLogical id of this artifact
[props.meta]MetaMetadata about the resource
[props.implicitRules]stringA set of rules under which this content was created
[props.language]stringLanguage of the resource content
[props.text]NarrativeText summary of the resource, for human interpretation
[props.contained]ResourceContained, inline Resources
[props.extension]ExtensionAdditional content defined by implementations
[props.modifierExtension]ExtensionExtensions that cannot be ignored
[props.identifier]IdentifierExternal Identifier
[props.accessionIdentifier]IdentifierIdentifier assigned by the lab
[props.status]stringavailable
[props.type]CodeableConceptType of specimen being collected
[props.subject]ReferencePatient associated with the specimen being collected
[props.receivedTime]dateTimeThe time when specimen was received for processing
[props.parent]ReferenceSpecimen from which this specimen originated
[props.request]ReferenceWhy the specimen was collected
[props.collection]BackboneElementSpecimen collection information
[props.processing]BackboneElementProcessing and processing step details
[props.container]BackboneElementDirect container of specimen (tube/slide, etc.)
[props.condition]CodeableConceptState of the specimen
[props.note]AnnotationComments