Current Build
Clinical Decision Support Work GroupMaturity Level: 2 Trial UseCompartments: Not linked to any defined compartments

This resource has 2 operations associated with it:

$applyApply
$data-requirementsData Requirements

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

The apply operation applies a PlanDefinition to a given context

The official URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/PlanDefinition-apply

Formal Definition (as a OperationDefinition).

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

This is not an idempotent operation

In Parameters:
NameCardinalityTypeBindingProfileDocumentation
patient1..1Reference(Patient)

The patient that is the target of the plan to be applied

encounter0..1Reference(Encounter)

The encounter in context, if any

practitioner0..1Reference(Practitioner)

The practitioner applying the plan definition

organization0..1Reference(Organization)

The organization applying the plan definition

userType0..1CodeableConcept

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

userLanguage0..1CodeableConcept

Preferred language of the person using the system

userTaskContext0..1CodeableConcept

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

setting0..1CodeableConcept

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

settingContext0..1CodeableConcept

Additional detail about the setting of the request, if any

Out Parameters:
NameCardinalityTypeBindingProfileDocumentation
return1..1CarePlan

The CarePlan that is the result of applying the plan definition

Note: as this 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 CarePlan resource, with activities for each of the applicable actions based on evaluating the applicability condition in context. For each applicable action, the activitydefinition is applied as described in the $apply operation of the ActivityDefinition resource, and the resulting resource is added as an activity to the CarePlan. If the ActivityDefinition includes library references, those libraries will be available to the evaluated expressions. If those libraries have parameters, those parameters will be bound by name to the parameters given to the operation

Apply the low suicide risk order set to patient 124 (Request):

GET [base]/PlanDefinition/example/$apply?patient=124

Returned on successful application of the order set (Response):

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8"?>
<CarePlan xmlns="http://hl7.org/fhir">
  <!-- This example demonstrates the result of an $apply operation for the citalopramPrescription activity definition. -->
  <id value="apply-operation-response"/>
  <text>
	<status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">
    Generated...
    </div>
  </text>
  <contained>
	<ProcedureRequest>
	  <id value="referralrequest"/>
	  <status value="draft"/>
      <intent value="proposal"/>
      <serviceRequested>
		<coding>
		  <system value="http://snomed.info/sct"/>
		  <code value="306206005"/>
		</coding>
		<text value="Referral to service (procedure)"/>
      </serviceRequested>
      <subject>
        <reference value="Patient/124"/>
      </subject>
      <occurrenceDateTime value="2017-02-26T11:47:00.00"/>
      <requester>
		<agent>
			<reference value="Practitioner/123"/>
		</agent>
	  </requester>
      <specialty>
		  <coding>
			  <system value="http://nucc.org/provider-taxonomy"/>
			  <code value="261QM0850X"/>
			  <display value="Adult Mental Health"/>
		  </coding>
      </specialty>
	  <reasonCode>
		  <coding>
			  <system value="http://example.org/CodeSystem/suicide-risk-assessment-score"/>
			  <code value="Low"/>
			  <display value="Low Suicide Risk"/>
		  </coding>
		  <text value="Low Suicide Risk"/>
	  </reasonCode>
	  <reasonReference>
		  <reference value="RiskAssessment/suicide-risk-assessment"/>
	  </reasonReference>
	</ProcedureRequest>
  </contained>
  <contained>
    <Medication>
      <id value="citalopramMedication"/>
      <code>
        <coding>
          <system value="http://www.nlm.nih.gov/research/umls/rxnorm"/>
          <code value="200371"/>
        </coding>
        <text value="citalopram"/>
      </code>
        <form>
          <coding>
            <system value="http://snomed.info/sct"/>
            <code value="385055001"/>
            <display value="Tablet dose form"/>
          </coding>
          <text value="Tablet dose form"/>
        </form>
        <ingredient>
          <itemReference>
            <reference value="#citalopramSubstance"/>
          </itemReference>
          <amount>
            <numerator>
              <value value="20"/>
              <unit value="mg"/>
            </numerator>
            <denominator>
              <value value="1"/>
              <unit value="{tbl}"/>
            </denominator>
          </amount>
        </ingredient>
    </Medication>
  </contained>
  <contained>
    <Substance>
      <id value="citalopramSubstance"/>
      <code>
        <coding>
          <system value="http://www.nlm.nih.gov/research/umls/rxnorm"/>
          <code value="2556"/>
        </coding>
        <text value="citalopram"/>
      </code>
    </Substance>
  </contained>
  <contained>
	<MedicationRequest>
	  <id value="citalopramPrescription"/>
	  <definition>
		<reference value="ActivityDefinition/citalopramPrescription"/>
	  </definition>
	  <status value="draft"/>
	  <intent value="proposal"/>
	  <medicationReference>
		  <reference value="#citalopramMedication"/>
	  </medicationReference>
	  <subject>
		  <reference value="Patient/124"/>
	  </subject>
	  <requester>
		<agent>
			<reference value="Practitioner/123"/>
		</agent>
	  </requester>
	  <reasonCode>
		  <coding>
			  <system value="http://example.org/CodeSystem/suicide-risk-assessment-score"/>
			  <code value="Low"/>
			  <display value="Low Suicide Risk"/>
		  </coding>
		  <text value="Low Suicide Risk"/>
	  </reasonCode>
	  <reasonReference>
		  <reference value="RiskAssessment/suicide-risk-assessment"/>
	  </reasonReference>
	  <dosageInstruction>
		<text value="1 tablet oral 1 time daily"/>
		<timing>
			<repeat>
				<frequency value="1"/>
				<period value="1"/>
				<periodUnit value="d"/>
			</repeat>
		</timing>
		<route>
			<coding>
				<code value="26643006"/>
				<display value="Oral route (qualifier value)"/>
			</coding>
			<text value="Oral route (qualifier value)"/>
		</route>
		<doseQuantity>
			<value value="1"/>
			<unit value="{tbl}"/>
		</doseQuantity>
	  </dosageInstruction>
	  <dispenseRequest>
		  <numberOfRepeatsAllowed value="3"/>
		  <quantity>
			  <value value="30"/>
			  <unit value="{tbl}"/>
		  </quantity>
	  </dispenseRequest>
	</MedicationRequest>
  </contained>
  <definition>
    <reference value="PlanDefinition/example"/>
  </definition>
  <status value="draft"/>
  <intent value="proposal"/>
  <subject>
	  <reference value="Patient/124"/>
  </subject>
  <activity>
	<reference>
		<reference value="#referralrequest"/>
	</reference>
  </activity>
  <activity>
    <reference>
      <reference value="#citalopramPrescription"/>
    </reference>
  </activity>
</CarePlan>

 

The data-requirements operation aggregates and returns the parameters and data requirements for the plan definition and all its dependencies as a single module definition library

The official URL for this operation definition is

 http://hl7.org/fhir/OperationDefinition/PlanDefinition-data-requirements

Formal Definition (as a OperationDefinition).

URL: [base]/PlanDefinition/[id]/$data-requirements

This is not an idempotent operation

Out Parameters:
NameCardinalityTypeBindingProfileDocumentation
return1..1Library

The result of the requirements gathering is a module-definition Library that describes the aggregate parameters, data requirements, and dependencies of the plan definition

Note: as this 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 effect of invoking this operation is to determine the aggregate set of data requirements and dependencies for the plan definition. The result is a Library resource with a type of module-definition that contains all the parameter definitions and data requirements of the plan definition and any libraries referenced by it. Implementations SHOULD aggregate data requirements intelligently (i.e. by collapsing overlapping data requirements)

Request data requirements for the Zika Virus intervention plan definition (Request):

GET [base]/PlanDefinition/zika-virus-intervention/$data-requirements

Returned on successful evaluation (Response):

HTTP/1.1 200 OK

{
  "resourceType": "Library",
  "type": {
    "coding": [
      {
        "code": "module-definition"
      }
    ]
  },
  "relatedArtifact": [
    {
      "type": "depends-on",
      "display": "Zika Affected Areas",
      "resource": {
        "reference": "ValueSet/zika-affected-areas"
      }
    },
    {
      "type": "depends-on",
      "display": "Pregnancy",
      "resource": {
        "identifier": "urn:oid:X.Y.Z",
        "display": "Pregnancy value set"
      }
    },
    {
      "type": "depends-on",
      "display": "Zika Exposure Assessment",
      "resource": {
        "identifier": "urn:oid:X.Y.Z",
        "display": "Zika Virus Exposure Assessment value set"
      }
    },
    {
      "type": "depends-on",
      "display": "Zika Virus Signs and Symptoms",
      "url": "https://phinvads.cdc.gov/vads/ViewValueSet.action?oid=2.16.840.1.114222.4.11.7459",
      "resource": {
        "identifier": "urn:oid:2.16.840.1.114222.4.11.7459",
        "display": "Zika Virus Signs and Symptoms value set"
      }
    },
  ]
  "dataRequirement": [
    {
      "type": "Condition",
      "codeFilter": [
        {
          "path": "code",
          "valueSetUri": "http://example.org/valueset/pregnancy"
        }
      ]
    },
    {
      "type": "Patient"
    },
    {
      "type": "Observation",
      "codeFilter": [
        {
          "path": "code",
          "valueSetUri": [
            "http://example.org/valueset/zika-exposure-assessment"
          ]
        },
        {
          "path": "status",
          "code": [
            {
              "code": "final"
            }
          ]
        }
      ]
    },
    {
      "type": "Condition",
      "codeFilter": [
        {
          "path": "category",
          "code": [
            {
              "code": "diagnosis"
            }
          ]
        },
        {
          "path": "clinicalStatus",
          "code": [
            {
              "code": "confirmed"
            }
          ]
        },
        {
          "path": "code",
          "valueSetUri": "urn:oid:2.16.840.1.114222.4.11.7459"
        }
      ]
    }
  ]
}