fhir-4@0.6.0
- addToBundle(resources, [name])
- create(resource)
- createBundle([props])
- delete(reference)
- read(reference)
- search(resourceType, options)
- update(reference, resource)
- uploadBundle(bundle)
This adaptor exports the following namespaced functions:
- builders.account(props)
- builders.activityDefinition(props)
- builders.administrableProductDefinition(props)
- builders.adverseEvent(props)
- builders.allergyIntolerance(props)
- builders.appointment(props)
- builders.appointmentResponse(props)
- builders.biologicallyDerivedProduct(props)
- builders.bodyStructure(props)
- builders.carePlan(props)
- builders.careTeam(props)
- builders.chargeItem(props)
- builders.chargeItemDefinition(props)
- builders.citation(props)
- builders.claim(props)
- builders.claimResponse(props)
- builders.clinicalImpression(props)
- builders.clinicalUseDefinition(props)
- builders.communication(props)
- builders.communicationRequest(props)
- builders.contract(props)
- builders.coverage(props)
- builders.coverageEligibilityRequest(props)
- builders.coverageEligibilityResponse(props)
- builders.detectedIssue(props)
- builders.device(props)
- builders.deviceDefinition(props)
- builders.deviceMetric(props)
- builders.deviceRequest(props)
- builders.deviceUseStatement(props)
- builders.diagnosticReport(props)
- builders.domainResource(props)
- builders.encounter(props)
- builders.enrollmentRequest(props)
- builders.enrollmentResponse(props)
- builders.episodeOfCare(props)
- builders.eventDefinition(props)
- builders.evidence(props)
- builders.evidenceReport(props)
- builders.evidenceVariable(props)
- builders.explanationOfBenefit(props)
- builders.familyMemberHistory(props)
- builders.flag(props)
- builders.goal(props)
- builders.group(props)
- builders.guidanceResponse(props)
- builders.healthcareService(props)
- builders.imagingStudy(props)
- builders.immunization(props)
- builders.immunizationEvaluation(props)
- builders.immunizationRecommendation(props)
- builders.ingredient(props)
- builders.insurancePlan(props)
- builders.invoice(props)
- builders.library(props)
- builders.list(props)
- builders.location(props)
- builders.manufacturedItemDefinition(props)
- builders.measure(props)
- builders.measureReport(props)
- builders.media(props)
- builders.medication(props)
- builders.medicationAdministration(props)
- builders.medicationDispense(props)
- builders.medicationKnowledge(props)
- builders.medicationRequest(props)
- builders.medicationStatement(props)
- builders.medicinalProductDefinition(props)
- builders.molecularSequence(props)
- builders.nutritionOrder(props)
- builders.nutritionProduct(props)
- builders.observation(props)
- builders.observationDefinition(props)
- builders.organization(props)
- builders.organizationAffiliation(props)
- builders.packagedProductDefinition(props)
- builders.patient(props)
- builders.paymentNotice(props)
- builders.paymentReconciliation(props)
- builders.person(props)
- builders.planDefinition(props)
- builders.practitioner(props)
- builders.practitionerRole(props)
- builders.procedure(props)
- builders.questionnaire(props)
- builders.questionnaireResponse(props)
- builders.regulatedAuthorization(props)
- builders.relatedPerson(props)
- builders.requestGroup(props)
- builders.researchDefinition(props)
- builders.researchElementDefinition(props)
- builders.researchStudy(props)
- builders.researchSubject(props)
- builders.riskAssessment(props)
- builders.schedule(props)
- builders.serviceRequest(props)
- builders.slot(props)
- builders.specimen(props)
- builders.specimenDefinition(props)
- builders.substance(props)
- builders.substanceDefinition(props)
- builders.supplyDelivery(props)
- builders.supplyRequest(props)
- builders.task(props)
- builders.testReport(props)
- builders.verificationResult(props)
- builders.visionPrescription(props)
- 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)
- datatypes.ref()
- datatypes.reference(ref)
- datatypes.setSystemMap()
Functions
addToBundle
addToBundle(resources, [name]) ⇒
Add a resource to a bundle on state, using the name as the key (or bundle by default).
The resource will be upserted (via PUT).
A new bundle will be generated if one does not already exist.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| resources | object/array | A resource or array of resources to add to the bundle |
| [name] | string | A name (key) for this bundle on state (defaults to bundle) |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| bundle | the updated bundle |
Example: Add a new patient resource to the default bundle
addToBundle(b.patient($.patientDetails))
create
create(resource) ⇒
Create a new resource. The resource does not need to include an id. The created resource will be returned to state.data.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| resource | object | The resource to create. |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the newly created resource. |
| response | the HTTP response returned by the server. |
Example: Create a Patient with a builder function
create(b.patient({
name: { family: "Messi", given: "Lionel", use: "official" },
}))
createBundle
createBundle([props]) ⇒
Generate a new bundle on state. Any existing bundle with the same name will be overwritten.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| [options.name] | string | A name (key) for this bundle on state (defaults to bundle) |
| [options.type] | string | The type of this bundle. Accepts document |
| [props] | object | Assign any arbitrary properties to the bundle object |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| (name) | the updated bundle |
Example: Create a default bundle and add an item
createBundle()
addToBundle($.patient)
Example: Create a batch-type bundle called 'upload'
createBundle({ name: 'upload', type: 'batch' })
Example: Create a bundle with custom properties
createBundle({}, { timestamp: new Date().toISOString() }})
* @example <caption>Create a named bundle and add an item</caption>
createBundle({ name: 'upload')
addToBundle($.patient, 'upload')
delete
delete(reference) ⇒
Delete a single FHIR resource.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| reference | string | The type and ID of the resource to delete, eg, Patient/123 |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| response | the HTTP response returned by the server. |
Example: Delete a single Patient resource
delete('Patient/12345')
read
read(reference) ⇒
Fetch a single FHIR resource.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| reference | string | The type and ID of the resource to read, eg, Patient/123 |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the newly updated resource, as returned by the server |
| response | the HTTP response returned by the server. |
Example: Read a single Patient resource
read('Patient/12345')
search
search(resourceType, options) ⇒
Search for matching FHIR resources. Exclude _ from search parameters, and pass query terms on options.query.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| resourceType | string | The type of the resource to search for. |
| options | object | Parameters, query and filter. |
| [options.*] | object | Pass supported query parameters without underscore. See FHIR Search Summary. |
| [options.query] | object | query terms to search for. These are appended to the query URL veratim.. |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the newly updated resource, as returned by the server |
| response | the HTTP response returned by the server. |
Example: Search with parameter and query term
search('Patient', {
lastUpdated: $.cursor,
count: 10,
query: { given: 'messi' },
})
Example: Search for patients with a given name containing "eve"
search('Patient', {
query: { 'given:contains': 'eve' },
})
update
update(reference, resource) ⇒
Update a resource. If the resource does not already exist, it will be created and state.response.statusCode will be 201.
Otherwise, the existing resource will be replaced.
To partially update a resource, use patch().
Returns: Operation
| Param | Type | Description |
|---|---|---|
| reference | string | The type and ID of the resource to update, eg, Patient/123 |
| resource | object | The new version of this resource. |
This operation writes the following keys to state:
| State Key | Description |
|---|---|
| data | the newly updated resource, as returned by the server |
| response | the HTTP response returned by the server. |
Example: Update a Patient with a builder function
update('Patient/123', b.patient({
id: 'Patient/123',
name: { family: "Messi", given: "Lionel", use: "official" },
}))
uploadBundle
uploadBundle(bundle) ⇒
Upload a bundle from state (created by addToBundle) as a transaction.
Returns: Operation
| Param | Type | Description |
|---|---|---|
| bundle | string/object | A bundle object or name of a bundle on state |
Example: Upload the default bundle
uploadBundle()
Example: Create and a bundle with a custom name
addToBundle($.patients, 'patientsBundle')
uploadBundle('patientsBundle')
Example: Upload a bundle from state
uploadBundle($.patientsBundle)
builders
These functions belong to the builders namespace.
builders.account
account(props)
Create a Account resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.coverage] | BackboneElement | The party(s) that are responsible for covering the payment of this account, and what order should they be applied to the account |
| [props.description] | string | Explanation of purpose/use |
| [props.guarantor] | BackboneElement | The parties ultimately responsible for balancing the Account |
| [props.identifier] | Identifier | Account number |
| [props.name] | string | Human-readable label |
| [props.owner] | Reference | Entity managing the Account |
| [props.partOf] | Reference | Reference to a parent Account |
| [props.servicePeriod] | Period | Transaction window |
| [props.status] | string | active |
| [props.subject] | Reference | The entity that caused the expenses |
| [props.type] | string | E.g. patient, expense, depreciation. Accepts all values from http://hl7.org/fhir/ValueSet/account-type |
builders.activityDefinition
activityDefinition(props)
Create a ActivityDefinition resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.approvalDate] | date | When the activity definition was approved by publisher |
| [props.author] | ContactDetail | Who authored the content |
| [props.bodySite] | string | What part of body to perform on. Accepts all values from http://hl7.org/fhir/ValueSet/body-site |
| [props.code] | string | Detail type of activity. Accepts all values from http://hl7.org/fhir/ValueSet/procedure-code |
| [props.contact] | ContactDetail | Contact details for the publisher |
| [props.copyright] | markdown | Use and/or publishing restrictions |
| [props.date] | dateTime | Date last changed |
| [props.description] | markdown | Natural language description of the activity definition |
| [props.doNotPerform] | boolean | True if the activity should not be performed |
| [props.dosage] | Dosage | Detailed dosage instructions |
| [props.dynamicValue] | BackboneElement | Dynamic aspects of the definition |
| [props.editor] | ContactDetail | Who edited the content |
| [props.effectivePeriod] | Period | When the activity definition is expected to be used |
| [props.endorser] | ContactDetail | Who endorsed the content |
| [props.experimental] | boolean | For testing purposes, not real usage |
| [props.identifier] | Identifier | Additional identifier for the activity definition |
| [props.intent] | string | proposal |
| [props.jurisdiction] | string | Intended jurisdiction for activity definition (if applicable). Accepts all values from http://hl7.org/fhir/ValueSet/jurisdiction |
| [props.kind] | string | Kind of resource. Accepts all values from http://hl7.org/fhir/ValueSet/request-resource-types |
| [props.lastReviewDate] | date | When the activity definition was last reviewed |
| [props.library] | canonical | Logic used by the activity definition |
| [props.location] | Reference | Where it should happen |
| [props.name] | string | Name for this activity definition (computer friendly) |
| [props.observationRequirement] | Reference | What observations are required to perform this action |
| [props.observationResultRequirement] | Reference | What observations must be produced by this action |
| [props.participant] | BackboneElement | Who should participate in the action |
| [props.priority] | string | routine |
| [props.product] | string | What's administered/supplied. Accepts all values from http://hl7.org/fhir/ValueSet/medication-codes |
| [props.profile] | canonical | What profile the resource needs to conform to |
| [props.publisher] | string | Name of the publisher (organization or individual) |
| [props.purpose] | markdown | Why this activity definition is defined |
| [props.quantity] | Quantity | How much is administered/consumed/supplied |
| [props.relatedArtifact] | RelatedArtifact | Additional documentation, citations, etc. |
| [props.reviewer] | ContactDetail | Who reviewed the content |
| [props.specimenRequirement] | Reference | What specimens are required to perform this action |
| [props.status] | string | draft |
| [props.subject] | string | Type of individual the activity definition is intended for. Accepts all values from http://hl7.org/fhir/ValueSet/subject-type |
| [props.subtitle] | string | Subordinate title of the activity definition |
| [props.timing] | Timing | dateTime | Age | Period | Range | Duration | When activity is to occur |
| [props.title] | string | Name for this activity definition (human friendly) |
| [props.topic] | string | E.g. Education, Treatment, Assessment, etc.. Accepts all values from http://hl7.org/fhir/ValueSet/definition-topic |
| [props.transform] | canonical | Transform to apply the template |
| [props.url] | string | Canonical identifier for this activity definition, represented as a URI (globally unique) |
| [props.usage] | string | Describes the clinical usage of the activity definition |
| [props.useContext] | UsageContext | The context that the content is intended to support |
| [props.version] | string | Business version of the activity definition |
builders.administrableProductDefinition
administrableProductDefinition(props)
Create a AdministrableProductDefinition resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.administrableDoseForm] | string | The dose form of the final product after necessary reconstitution or processing. Accepts all values from http://hl7.org/fhir/ValueSet/administrable-dose-form |
| [props.device] | Reference | A device that is integral to the medicinal product, in effect being considered as an "ingredient" of the medicinal product |
| [props.formOf] | Reference | References a product from which one or more of the constituent parts of that product can be prepared and used as described by this administrable product |
| [props.identifier] | Identifier | An identifier for the administrable product |
| [props.ingredient] | string | The ingredients of this administrable medicinal product. This is only needed if the ingredients are not specified either using ManufacturedItemDefiniton, or using by incoming references from the Ingredient resource. Accepts all values from http://hl7.org/fhir/ValueSet/substance-codes |
| [props.producedFrom] | Reference | Indicates the specific manufactured items that are part of the 'formOf' product that are used in the preparation of this specific administrable form |
| [props.property] | BackboneElement | Characteristics e.g. a product's onset of action |
| [props.routeOfAdministration] | BackboneElement | The path by which the product is taken into or makes contact with the body |
| [props.status] | string | draft |
| [props.unitOfPresentation] | string | The presentation type in which this item is given to a patient. e.g. for a spray - 'puff'. Accepts all values from http://hl7.org/fhir/ValueSet/unit-of-presentation |
builders.adverseEvent
adverseEvent(props)
Create a AdverseEvent resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.actuality] | string | actual |
| [props.category] | string | product-problem |
| [props.contributor] | Reference | Who was involved in the adverse event or the potential adverse event |
| [props.date] | dateTime | When the event occurred |
| [props.detected] | dateTime | When the event was detected |
| [props.encounter] | Reference | Encounter created as part of |
| [props.event] | string | Type of the event itself in relation to the subject. Accepts all values from http://hl7.org/fhir/ValueSet/adverse-event-type |
| [props.identifier] | Identifier | Business identifier for the event |
| [props.location] | Reference | Location where adverse event occurred |
| [props.outcome] | string | resolved |
| [props.recordedDate] | dateTime | When the event was recorded |
| [props.recorder] | Reference | Who recorded the adverse event |
| [props.referenceDocument] | Reference | AdverseEvent.referenceDocument |
| [props.resultingCondition] | Reference | Effect on the subject due to this event |
| [props.seriousness] | string | Seriousness of the event. Accepts all values from http://hl7.org/fhir/ValueSet/adverse-event-seriousness |
| [props.severity] | string | mild |
| [props.study] | Reference | AdverseEvent.study |
| [props.subject] | Reference | Subject impacted by event |
| [props.subjectMedicalHistory] | Reference | AdverseEvent.subjectMedicalHistory |
| [props.suspectEntity] | BackboneElement | The suspected agent causing the adverse event |
builders.allergyIntolerance
allergyIntolerance(props)
Create a AllergyIntolerance resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.asserter] | Reference | Source of the information about the allergy |
| [props.category] | string | food |
| [props.clinicalStatus] | string | active |
| [props.code] | string | Code that identifies the allergy or intolerance. Accepts all values from http://hl7.org/fhir/ValueSet/allergyintolerance-code |
| [props.criticality] | string | low |
| [props.encounter] | Reference | Encounter when the allergy or intolerance was asserted |
| [props.identifier] | Identifier | External ids for this item |
| [props.lastOccurrence] | dateTime | Date(/time) of last known occurrence of a reaction |
| [props.note] | Annotation | Additional text not captured in other fields |
| [props.onset] | dateTime | Age | Period | Range | string | When allergy or intolerance was identified |
| [props.patient] | Reference | Who the sensitivity is for |
| [props.reaction] | BackboneElement | Adverse Reaction Events linked to exposure to substance |
| [props.recordedDate] | dateTime | Date first version of the resource instance was recorded |
| [props.recorder] | Reference | Who recorded the sensitivity |
| [props.type] | string | allergy |
| [props.verificationStatus] | string | unconfirmed |
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.appointmentType] | string | The style of appointment or patient that has been booked in the slot (not service type). Accepts all values from http://terminology.hl7.org/ValueSet/v2-0276 |
| [props.basedOn] | Reference | The service request this appointment is allocated to assess |
| [props.cancelationReason] | string | The coded reason for the appointment being cancelled. Accepts all values from http://hl7.org/fhir/ValueSet/appointment-cancellation-reason |
| [props.comment] | string | Additional comments |
| [props.created] | dateTime | The date that this appointment was initially created |
| [props.description] | string | Shown on a subject line in a meeting request, or appointment list |
| [props.end] | instant | When appointment is to conclude |
| [props.identifier] | Identifier | External Ids for this item |
| [props.minutesDuration] | number | Can be less than start/end (e.g. estimate) |
| [props.participant] | BackboneElement | Participants involved in appointment |
| [props.patientInstruction] | string | Detailed information and instructions for the patient |
| [props.priority] | unsignedInt | Used to make informed decisions if needing to re-prioritize |
| [props.reasonCode] | string | Coded reason this appointment is scheduled. Accepts all values from http://hl7.org/fhir/ValueSet/encounter-reason |
| [props.reasonReference] | Reference | Reason the appointment is to take place (resource) |
| [props.requestedPeriod] | Period | Potential date/time interval(s) requested to allocate the appointment within |
| [props.serviceCategory] | string | A broad categorization of the service that is to be performed during this appointment. Accepts all values from http://hl7.org/fhir/ValueSet/service-category |
| [props.serviceType] | string | The specific service that is to be performed during this appointment. Accepts all values from http://hl7.org/fhir/ValueSet/service-type |
| [props.slot] | Reference | The slots that this appointment is filling |
| [props.specialty] | string | The specialty of a practitioner that would be required to perform the service requested in this appointment. Accepts all values from http://hl7.org/fhir/ValueSet/c80-practice-codes |
| [props.start] | instant | When appointment is to take place |
| [props.status] | string | proposed |
| [props.supportingInformation] | Reference | Additional information to support the appointment |
builders.appointmentResponse
appointmentResponse(props)
Create a AppointmentResponse resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.actor] | Reference | Person, Location, HealthcareService, or Device |
| [props.appointment] | Reference | Appointment this response relates to |
| [props.comment] | string | Additional comments |
| [props.end] | instant | Time from appointment, or requested new end time |
| [props.identifier] | Identifier | External Ids for this item |
| [props.participantStatus] | string | accepted |
| [props.participantType] | string | Role of participant in the appointment. Accepts all values from http://hl7.org/fhir/ValueSet/encounter-participant-type |
| [props.start] | instant | Time from appointment, or requested new start time |
builders.biologicallyDerivedProduct
biologicallyDerivedProduct(props)
Create a BiologicallyDerivedProduct resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.collection] | BackboneElement | How this product was collected |
| [props.identifier] | Identifier | External ids for this item |
| [props.manipulation] | BackboneElement | Any manipulation of product post-collection |
| [props.parent] | Reference | BiologicallyDerivedProduct parent |
| [props.processing] | BackboneElement | Any processing of the product during collection |
| [props.productCategory] | string | organ |
| [props.productCode] | CodeableConcept | What this biologically derived product is |
| [props.quantity] | integer | The amount of this biologically derived product |
| [props.request] | Reference | Procedure request |
| [props.status] | string | available |
| [props.storage] | BackboneElement | Product storage |
builders.bodyStructure
bodyStructure(props)
Create a BodyStructure resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.active] | boolean | Whether this record is in active use |
| [props.description] | string | Text description |
| [props.identifier] | Identifier | Bodystructure identifier |
| [props.image] | Attachment | Attached images |
| [props.location] | string | Body site. Accepts all values from http://hl7.org/fhir/ValueSet/body-site |
| [props.locationQualifier] | string | Body site modifier. Accepts all values from http://hl7.org/fhir/ValueSet/bodystructure-relative-location |
| [props.morphology] | string | Kind of Structure. Accepts all values from http://hl7.org/fhir/ValueSet/bodystructure-code |
| [props.patient] | Reference | Who this is about |
builders.carePlan
carePlan(props)
Create a CarePlan resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.activity] | BackboneElement | Action to occur as part of plan |
| [props.addresses] | Reference | Health issues this plan addresses |
| [props.author] | Reference | Who is the designated responsible party |
| [props.basedOn] | Reference | Fulfills CarePlan |
| [props.careTeam] | Reference | Who's involved in plan? |
| [props.category] | string | Type of plan. Accepts all values from http://hl7.org/fhir/ValueSet/care-plan-category |
| [props.contributor] | Reference | Who provided the content of the care plan |
| [props.created] | dateTime | Date record was first recorded |
| [props.description] | string | Summary of nature of plan |
| [props.encounter] | Reference | Encounter created as part of |
| [props.goal] | Reference | Desired outcome of plan |
| [props.identifier] | Identifier | External Ids for this plan |
| [props.instantiatesCanonical] | canonical | Instantiates FHIR protocol or definition |
| [props.instantiatesUri] | string | Instantiates external protocol or definition |
| [props.intent] | string | proposal |
| [props.note] | Annotation | Comments about the plan |
| [props.partOf] | Reference | Part of referenced CarePlan |
| [props.period] | Period | Time period plan covers |
| [props.replaces] | Reference | CarePlan replaced by this CarePlan |
| [props.status] | string | draft |
| [props.subject] | Reference | Who the care plan is for |
| [props.supportingInfo] | Reference | Information considered as part of plan |
| [props.title] | string | Human-friendly name for the care plan |
builders.careTeam
careTeam(props)
Create a CareTeam resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.category] | string | Type of team. Accepts all values from http://hl7.org/fhir/ValueSet/care-team-category |
| [props.encounter] | Reference | Encounter created as part of |
| [props.identifier] | Identifier | External Ids for this team |
| [props.managingOrganization] | Reference | Organization responsible for the care team |
| [props.name] | string | Name of the team, such as crisis assessment team |
| [props.note] | Annotation | Comments made about the CareTeam |
| [props.participant] | BackboneElement | Members of the team |
| [props.period] | Period | Time period team covers |
| [props.reasonCode] | string | Why the care team exists. Accepts all values from http://hl7.org/fhir/ValueSet/clinical-findings |
| [props.reasonReference] | Reference | Why the care team exists |
| [props.status] | string | proposed |
| [props.subject] | Reference | Who care team is for |
| [props.telecom] | ContactPoint | A contact detail for the care team (that applies to all members) |
builders.chargeItem
chargeItem(props)
Create a ChargeItem resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.account] | Reference | Account to place this charge |
| [props.bodysite] | string | Anatomical location, if relevant. Accepts all values from http://hl7.org/fhir/ValueSet/body-site |
| [props.code] | string | A code that identifies the charge, like a billing code. Accepts all values from http://hl7.org/fhir/ValueSet/chargeitem-billingcodes |
| [props.context] | Reference | Encounter / Episode associated with event |
| [props.costCenter] | Reference | Organization that has ownership of the (potential, future) revenue |
| [props.definitionCanonical] | canonical | Resource defining the code of this ChargeItem |
| [props.definitionUri] | string | Defining information about the code of this charge item |
| [props.enteredDate] | dateTime | Date the charge item was entered |
| [props.enterer] | Reference | Individual who was entering |
| [props.factorOverride] | decimal | Factor overriding the associated rules |
| [props.identifier] | Identifier | Business Identifier for item |
| [props.note] | Annotation | Comments made about the ChargeItem |
| [props.occurrence] | dateTime | Period | Timing | When the charged service was applied |
| [props.overrideReason] | string | Reason for overriding the list price/factor |
| [props.partOf] | Reference | Part of referenced ChargeItem |
| [props.performer] | BackboneElement | Who performed charged service |
| [props.performingOrganization] | Reference | Organization providing the charged service |
| [props.priceOverride] | Money | Price overriding the associated rules |
| [props.product] | string | Product charged. Accepts all values from http://hl7.org/fhir/ValueSet/device-kind |
| [props.quantity] | Quantity | Quantity of which the charge item has been serviced |
| [props.reason] | string | Why was the charged service rendered?. Accepts all values from http://hl7.org/fhir/ValueSet/icd-10 |
| [props.requestingOrganization] | Reference | Organization requesting the charged service |
| [props.service] | Reference | Which rendered service is being charged? |
| [props.status] | string | planned |
| [props.subject] | Reference | Individual service was done for/to |
| [props.supportingInformation] | Reference | Further information supporting this charge |
builders.chargeItemDefinition
chargeItemDefinition(props)
Create a ChargeItemDefinition resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.applicability] | BackboneElement | Whether or not the billing code is applicable |
| [props.approvalDate] | date | When the charge item definition was approved by publisher |
| [props.code] | string | Billing codes or product types this definition applies to. Accepts all values from http://hl7.org/fhir/ValueSet/chargeitem-billingcodes |
| [props.contact] | ContactDetail | Contact details for the publisher |
| [props.copyright] | markdown | Use and/or publishing restrictions |
| [props.date] | dateTime | Date last changed |
| [props.derivedFromUri] | string | Underlying externally-defined charge item definition |
| [props.description] | markdown | Natural language description of the charge item definition |
| [props.effectivePeriod] | Period | When the charge item definition is expected to be used |
| [props.experimental] | boolean | For testing purposes, not real usage |
| [props.identifier] | Identifier | Additional identifier for the charge item definition |
| [props.instance] | Reference | Instances this definition applies to |
| [props.jurisdiction] | string | Intended jurisdiction for charge item definition (if applicable). Accepts all values from http://hl7.org/fhir/ValueSet/jurisdiction |
| [props.lastReviewDate] | date | When the charge item definition was last reviewed |
| [props.partOf] | canonical | A larger definition of which this particular definition is a component or step |
| [props.propertyGroup] | BackboneElement | Group of properties which are applicable under the same conditions |
| [props.publisher] | string | Name of the publisher (organization or individual) |
| [props.replaces] | canonical | Completed or terminated request(s) whose function is taken by this new request |
| [props.status] | string | draft |
| [props.title] | string | Name for this charge item definition (human friendly) |
| [props.url] | string | Canonical identifier for this charge item definition, represented as a URI (globally unique) |
| [props.useContext] | UsageContext | The context that the content is intended to support |
| [props.version] | string | Business version of the charge item definition |
builders.citation
citation(props)
Create a Citation resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.approvalDate] | date | When the citation was approved by publisher |
| [props.author] | ContactDetail | Who authored the Citation |
| [props.citedArtifact] | BackboneElement | The article or artifact being described |
| [props.classification] | BackboneElement | The assignment to an organizing scheme |
| [props.contact] | ContactDetail | Contact details for the publisher of the Citation Resource |
| [props.copyright] | markdown | Use and/or publishing restrictions for the Citation, not for the cited artifact |
| [props.currentState] | string | The status of the citation. Accepts all values from http://hl7.org/fhir/ValueSet/citation-status-type |
| [props.date] | dateTime | Date last changed |
| [props.description] | markdown | Natural language description of the citation |
| [props.editor] | ContactDetail | Who edited the Citation |
| [props.effectivePeriod] | Period | When the citation is expected to be used |
| [props.endorser] | ContactDetail | Who endorsed the Citation |
| [props.experimental] | boolean | For testing purposes, not real usage |
| [props.identifier] | Identifier | Identifier for the Citation resource itself |
| [props.jurisdiction] | string | Intended jurisdiction for citation (if applicable). Accepts all values from http://hl7.org/fhir/ValueSet/jurisdiction |
| [props.lastReviewDate] | date | When the citation was last reviewed |
| [props.name] | string | Name for this citation (computer friendly) |
| [props.note] | Annotation | Used for general notes and annotations not coded elsewhere |
| [props.publisher] | string | The publisher of the Citation, not the publisher of the article or artifact being cited |
| [props.purpose] | markdown | Why this citation is defined |
| [props.relatesTo] | BackboneElement | Artifact related to the Citation Resource |
| [props.reviewer] | ContactDetail | Who reviewed the Citation |
| [props.status] | string | draft |
| [props.statusDate] | BackboneElement | An effective date or period for a status of the citation |
| [props.summary] | BackboneElement | A human-readable display of the citation |
| [props.title] | string | Name for this citation (human friendly) |
| [props.url] | string | Canonical identifier for this citation, represented as a globally unique URI |
| [props.useContext] | UsageContext | The context that the Citation Resource content is intended to support |
| [props.version] | string | Business version of the citation |
builders.claim
claim(props)
Create a Claim resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.accident] | BackboneElement | Details of the event |
| [props.billablePeriod] | Period | Relevant time frame for the claim |
| [props.careTeam] | BackboneElement | Members of the care team |
| [props.created] | dateTime | Resource creation date |
| [props.diagnosis] | BackboneElement | Pertinent diagnosis information |
| [props.enterer] | Reference | Author of the claim |
| [props.facility] | Reference | Servicing facility |
| [props.fundsReserve] | string | For whom to reserve funds. Accepts all values from http://hl7.org/fhir/ValueSet/fundsreserve |
| [props.identifier] | Identifier | Business Identifier for claim |
| [props.insurance] | BackboneElement | Patient insurance information |
| [props.insurer] | Reference | Target |
| [props.item] | BackboneElement | Product or service provided |
| [props.originalPrescription] | Reference | Original prescription if superseded by fulfiller |
| [props.patient] | Reference | The recipient of the products and services |
| [props.payee] | BackboneElement | Recipient of benefits payable |
| [props.prescription] | Reference | Prescription authorizing services and products |
| [props.priority] | string | Desired processing ugency. Accepts all values from http://hl7.org/fhir/ValueSet/process-priority |
| [props.procedure] | BackboneElement | Clinical procedures performed |
| [props.provider] | Reference | Party responsible for the claim |
| [props.referral] | Reference | Treatment referral |
| [props.related] | BackboneElement | Prior or corollary claims |
| [props.status] | string | active |
| [props.subType] | string | More granular claim type. Accepts all values from http://hl7.org/fhir/ValueSet/claim-subtype |
| [props.supportingInfo] | BackboneElement | Supporting information |
| [props.total] | Money | Total claim cost |
| [props.type] | string | Category or discipline. Accepts all values from http://hl7.org/fhir/ValueSet/claim-type |
| [props.use] | string | claim |
builders.claimResponse
claimResponse(props)
Create a ClaimResponse resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.addItem] | BackboneElement | Insurer added line items |
| [props.adjudication] | any | Header-level adjudication |
| [props.communicationRequest] | Reference | Request for additional information |
| [props.created] | dateTime | Response creation date |
| [props.disposition] | string | Disposition Message |
| [props.error] | BackboneElement | Processing errors |
| [props.form] | Attachment | Printed reference or actual form |
| [props.formCode] | string | Printed form identifier. Accepts all values from http://hl7.org/fhir/ValueSet/forms |
| [props.fundsReserve] | string | Funds reserved status. Accepts all values from http://hl7.org/fhir/ValueSet/fundsreserve |
| [props.identifier] | Identifier | Business Identifier for a claim response |
| [props.insurance] | BackboneElement | Patient insurance information |
| [props.insurer] | Reference | Party responsible for reimbursement |
| [props.item] | BackboneElement | Adjudication for claim line items |
| [props.outcome] | string | queued |
| [props.patient] | Reference | The recipient of the products and services |
| [props.payeeType] | string | Party to be paid any benefits payable. Accepts all values from http://hl7.org/fhir/ValueSet/payeetype |
| [props.payment] | BackboneElement | Payment Details |
| [props.preAuthPeriod] | Period | Preauthorization reference effective period |
| [props.preAuthRef] | string | Preauthorization reference |
| [props.processNote] | BackboneElement | Note concerning adjudication |
| [props.request] | Reference | Id of resource triggering adjudication |
| [props.requestor] | Reference | Party responsible for the claim |
| [props.status] | string | active |
| [props.subType] | string | More granular claim type. Accepts all values from http://hl7.org/fhir/ValueSet/claim-subtype |
| [props.total] | BackboneElement | Adjudication totals |
| [props.type] | string | More granular claim type. Accepts all values from http://hl7.org/fhir/ValueSet/claim-type |
| [props.use] | string | claim |
builders.clinicalImpression
clinicalImpression(props)
Create a ClinicalImpression resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.assessor] | Reference | The clinician performing the assessment |
| [props.code] | CodeableConcept | Kind of assessment performed |
| [props.date] | dateTime | When the assessment was documented |
| [props.description] | string | Why/how the assessment was performed |
| [props.effective] | dateTime | Period | Time of assessment |
| [props.encounter] | Reference | Encounter created as part of |
| [props.finding] | BackboneElement | Possible or likely findings and diagnoses |
| [props.identifier] | Identifier | Business identifier |
| [props.investigation] | BackboneElement | One or more sets of investigations (signs, symptoms, etc.) |
| [props.note] | Annotation | Comments made about the ClinicalImpression |
| [props.previous] | Reference | Reference to last assessment |
| [props.problem] | Reference | Relevant impressions of patient state |
| [props.prognosisCodeableConcept] | string | Estimate of likely outcome. Accepts all values from http://hl7.org/fhir/ValueSet/clinicalimpression-prognosis |
| [props.prognosisReference] | Reference | RiskAssessment expressing likely outcome |
| [props.protocol] | string | Clinical Protocol followed |
| [props.status] | string | in-progress |
| [props.statusReason] | CodeableConcept | Reason for current status |
| [props.subject] | Reference | Patient or group assessed |
| [props.summary] | string | Summary of the assessment |
| [props.supportingInfo] | Reference | Information supporting the clinical impression |
builders.clinicalUseDefinition
clinicalUseDefinition(props)
Create a ClinicalUseDefinition resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.category] | string | A categorisation of the issue, primarily for dividing warnings into subject heading areas such as "Pregnancy", "Overdose". Accepts all values from http://hl7.org/fhir/ValueSet/clinical-use-definition-category |
| [props.contraindication] | BackboneElement | Specifics for when this is a contraindication |
| [props.identifier] | Identifier | Business identifier for this issue |
| [props.indication] | BackboneElement | Specifics for when this is an indication |
| [props.interaction] | BackboneElement | Specifics for when this is an interaction |
| [props.population] | Reference | The population group to which this applies |
| [props.status] | string | Whether this is a current issue or one that has been retired etc. Accepts all values from http://hl7.org/fhir/ValueSet/publication-status |
| [props.subject] | Reference | The medication or procedure for which this is an indication |
| [props.type] | string | indication |
| [props.undesirableEffect] | BackboneElement | A possible negative outcome from the use of this treatment |
| [props.warning] | BackboneElement | Critical environmental, health or physical risks or hazards. For example 'Do not operate heavy machinery', 'May cause drowsiness' |
builders.communication
communication(props)
Create a Communication resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.about] | Reference | Resources that pertain to this communication |
| [props.basedOn] | Reference | Request fulfilled by this communication |
| [props.category] | string | Message category. Accepts all values from http://hl7.org/fhir/ValueSet/communication-category |
| [props.encounter] | Reference | Encounter created as part of |
| [props.identifier] | Identifier | Unique identifier |
| [props.inResponseTo] | Reference | Reply to |
| [props.instantiatesCanonical] | canonical | Instantiates FHIR protocol or definition |
| [props.instantiatesUri] | string | Instantiates external protocol or definition |
| [props.medium] | string | A channel of communication. Accepts all values from http://terminology.hl7.org/ValueSet/v3-ParticipationMode |
| [props.note] | Annotation | Comments made about the communication |
| [props.partOf] | Reference | Part of this action |
| [props.payload] | BackboneElement | Message payload |
| [props.priority] | string | routine |
| [props.reasonCode] | string | Indication for message. Accepts all values from http://hl7.org/fhir/ValueSet/clinical-findings |
| [props.reasonReference] | Reference | Why was communication done? |
| [props.received] | dateTime | When received |
| [props.recipient] | Reference | Message recipient |
| [props.sender] | Reference | Message sender |
| [props.sent] | dateTime | When sent |
| [props.status] | string | preparation |
| [props.statusReason] | string | Reason for current status. Accepts all values from http://hl7.org/fhir/ValueSet/communication-not-done-reason |
| [props.subject] | Reference | Focus of message |
| [props.topic] | string | Description of the purpose/content. Accepts all values from http://hl7.org/fhir/ValueSet/communication-topic |
builders.communicationRequest
communicationRequest(props)
Create a CommunicationRequest resource.
| Param | Type | Description |
|---|---|---|
| props | object | Properties to apply to the resource (includes common and custom properties). |
| [props.about] | Reference | Resources that pertain to this communication request |
| [props.authoredOn] | dateTime | When request transitioned to being actionable |
| [props.basedOn] | Reference | Fulfills plan or proposal |
| [props.category] | string | Message category. Accepts all values from http://hl7.org/fhir/ValueSet/communication-category |
| [props.doNotPerform] | boolean | True if request is prohibiting action |
| [props.encounter] | Reference | Encounter created as part of |
| [props.groupIdentifier] | Identifier | Composite request this is part of |
| [props.identifier] | Identifier | Unique identifier |
| [props.medium] | string | A channel of communication. Accepts all values from http://terminology.hl7.org/ValueSet/v3-ParticipationMode |
| [props.note] | Annotation | Comments made about communication request |
| [props.occurrence] | dateTime | Period | When scheduled |
| [props.payload] | BackboneElement | Message payload |
| [props.priority] | string | routine |
| [props.reasonCode] | string | Why is communication needed?. Accepts all values from http://terminology.hl7.org/ValueSet/v3-ActReason |
| [props.reasonReference] | Reference | Why is communication needed? |
| [props.recipient] | Reference | Message recipient |
| [props.replaces] | Reference | Request(s) replaced by this request |
| [props.requester] | Reference | Who/what is requesting service |
| [props.sender] | Reference | Message sender |
| [props.status] | string | draft |
| [props.statusReason] | CodeableConcept | Reason for current status |
| [props.subject] | Reference | Focus of message |