This page is part of the FHIR Specification (v5.0.0-snapshot3: R5 Snapshot #3, to support Connectathon 32). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions
Orders and Observations Work Group | Maturity Level: 1 | Trial Use | Compartments: N/A |
The apply operation applies a SpecimenDefinition in a given context to create a Specimen resource instance.
The canonical URL for this operation definition is
http://hl7.org/fhir/OperationDefinition/SpecimenDefinition-apply
Formal Definition (as a OperationDefinition).
URL: [base]/SpecimenDefinition/$apply
URL: [base]/SpecimenDefinition/[id]/$apply
This is an idempotent operation
In Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
specimenDefinition | 0..1 | SpecimenDefinition | The specimen definition to be applied. If the operation is invoked at the instance level, this parameter is not allowed; if the operation is invoked at the type level, this parameter is required | ||
subject | 1..* | string (reference) | The subject(s) that is/are the target of the Specimen instance to be created. The subject may be a Patient, Group, Device, Substance or Location. Subjects provided in this parameter will be resolved as the subject of the Specimen based on the type of the subject. If multiple subjects of the same type are provided, the behavior is implementation-defined | ||
collector | 0..1 | string (reference) | The practitioner (or practitioner role) that is collecting the specimen | ||
userType | 0..1 | CodeableConcept | The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.) | ||
userLanguage | 0..1 | CodeableConcept | Preferred language of the person using the system | ||
userTaskContext | 0..1 | CodeableConcept | The task the system user is performing, e.g. laboratory results review, medication list review, etc. This information can be used to tailor decision support outputs, such as recommended information resources | ||
setting | 0..1 | CodeableConcept | The current setting of the request (inpatient, outpatient, etc.) | ||
settingContext | 0..1 | CodeableConcept | Additional detail about the setting of the request, if any | ||
Out Parameters: | |||||
Name | Cardinality | Type | Binding | Profile | Documentation |
return | 1..1 | Specimen | The Specimen resource that is the result of applying the specimen definition Note: as this is the only out parameter, it is a resource, and it has the name 'return', the result of this operation is returned directly as a resource |
The result of this operation is a Specimen resource based on the definition of the specimen as described in the SpecimenDefinition resource and the supplied parameters.
Request: Apply an example serum-plasma specimen definition to the specimen collected for patient pat2
GET [base]/SpecimenDefinition/sst/$apply?subject=Patient/pat2
Response: Returned on successful creation of the specimen resource instance
HTTP/1.1 200 OK <?xml version="1.0" encoding="UTF-8"?> <Specimen xmlns="http://hl7.org/fhir"> <id value="sst"/> <accessionIdentifier> <system value="http://acme.com/labs/accession-ids"/> <value value="20150816-00124"/> </accessionIdentifier> <type> <coding> <system value="http://snomed.info/sct"/> <code value="119364003"/> <display value="Serum-plasma sample"/> </coding> </type> <subject> <reference value="Patient/pat2"/> </subject> <request> <reference value="ServiceRequest/ft4"/> </request> <collection> <collector> <reference value="Practitioner/f202"/> </collector> <collectedDateTime value="2015-08-16T06:40:17Z"/> </collection> <container> <type> <coding> <system value="http://acme.com/labs"/> <code value="SST"/> <display value="Serum Separator Tube"/> </coding> </type> </container> </Specimen>
For more information about operations, including how they are invoked, see Operations.