This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions icon

Orders and Observations icon Work Group Maturity Level: 1Trial 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


Formal Definition (as a OperationDefinition).

URL: [base]/SpecimenDefinition/$apply

URL: [base]/SpecimenDefinition/[id]/$apply

This is an idempotent operation

In Parameters:

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


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


The practitioner (or practitioner role) that is collecting the specimen


The type of user initiating the request, e.g. patient, healthcare provider, or specific type of healthcare provider (physician, nurse, etc.)


Preferred language of the person using the system


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


The current setting of the request (inpatient, outpatient, etc.)


Additional detail about the setting of the request, if any

Out Parameters:

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"/>
		<system value="http://acme.com/labs/accession-ids"/>
		<value value="20150816-00124"/>
			<system value="http://snomed.info/sct"/>
			<code value="119364003"/>
			<display value="Serum-plasma sample"/>
		<reference value="Patient/pat2"/>
		<reference value="ServiceRequest/ft4"/>
			<reference value="Practitioner/f202"/>
		<collectedDateTime value="2015-08-16T06:40:17Z"/>
				<system value="http://acme.com/labs"/>
				<code value="SST"/>
				<display value="Serum Separator Tube"/>


For more information about operations, including how they are invoked, see Operations.