<OperationDefinition xmlns="http://hl7.org/fhir"> <id value="PlanDefinition-i-apply"/> <text> <status value="generated"/> <div xmlns="http://www.w3.org/1999/xhtml"><h2>apply</h2><p>OPERATION: apply</p><p>The official URL for this operation definition is: </p><pre>http://ehealth.sundhed.dk/fhir/OperationDefinition/PlanDefinition-i-apply</pre><div><p>This operation creates a CarePlan for a specific EpisodeOfCare using this PlanDefinition as a template.</p> <h3>Parameter description</h3> <ul> <li>1..1 EpisodeOfCare: Reference to the EpisodeOfCare in context of which a new CarePlan should be created.</li> </ul> <p>Example:</p> <pre><code class="language-json">{ 'resourceType': 'Parameters', 'parameter': [ { 'name': 'episodeOfCare', 'valueReference': { 'reference': 'http://local.ehealth.sundhed.dk:31380/hapi-fhir-server/fhir/EpisodeOfCare/38' } } ] } </code></pre> <h3>Output description</h3> <p>Upon success this operation returns an CarePlan resource.</p> <p>Example output:</p> <pre><code class="language-json">{ 'resourceType': 'Parameters', 'parameter': [ { 'name': 'return', 'resource': { { 'resourceType': 'CarePlan', 'id': '30', 'meta': { 'versionId': '1', 'lastUpdated': '2019-04-11T10:55:30.374+00:00', 'profile': [ 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careplan' ] }, 'contained': [ { 'resourceType': 'Condition', 'id': '1', 'clinicalStatus': 'active', 'subject': { 'reference': 'http://ehealth.sundhed.dk/patient/fhir/Patient/46216' }, 'assertedDate': '2019-04-11T12:55:30+02:00' } ], 'definition': [ { 'reference': 'http://ehealth.sundhed.dk/hapi-fhir-server/fhir/PlanDefinition/23' } ], 'status': 'active', 'intent': 'order', 'category': [ { 'coding': [ { 'system': 'http://snomed.info/sct', 'code': '412776001', 'display': 'Chronic obstructive pulmonary disease clinical management plan' } ] } ], 'subject': { 'reference': 'http://ehealth.sundhed.dk/patient/fhir/Patient/10016' }, 'context': { 'reference': 'http://ehealth.sundhed.dk/episodeofcare/fhir/EpisodeOfCare/24' }, 'period': { 'start': '2019-04-11T10:55:30+00:00' }, 'addresses': [ { 'reference': '#1' } ], 'activity': [ { 'reference': { 'reference': 'http://ehealth.sundhed.dk/procedurerequest/fhir/ProcedureRequest/28' } }, { 'reference': { 'reference': 'http://ehealth.sundhed.dk/procedurerequest/fhir/ProcedureRequest/29' } } ] } } ] } </code></pre> </div><p>URL: [base]/PlanDefinition/[id]/$apply</p><p>Parameters</p><table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>episodeOfCare</td><td>1..1</td><td><a href="http://hl7.org/fhir/STU3/datatypes.html#Reference">Reference</a></td><td/><td/></tr><tr><td>OUT</td><td>return</td><td>0..1</td><td><a href="http://hl7.org/fhir/STU3/parameters.html">Parameters</a></td><td/><td/></tr></table></div> </text> <url value="http://ehealth.sundhed.dk/fhir/OperationDefinition/PlanDefinition-i-apply"/> <version value="2019.5.3"/> <name value="apply"/> <status value="active"/> <kind value="operation"/> <date value="2019-06-07T11:10:06+00:00"/> <description value="This operation creates a CarePlan for a specific EpisodeOfCare using this PlanDefinition as a template. ### Parameter description - 1..1 EpisodeOfCare: Reference to the EpisodeOfCare in context of which a new CarePlan should be created. Example: ```json { 'resourceType': 'Parameters', 'parameter': [ { 'name': 'episodeOfCare', 'valueReference': { 'reference': 'http://local.ehealth.sundhed.dk:31380/hapi-fhir-server/fhir/EpisodeOfCare/38' } } ] } ``` ### Output description Upon success this operation returns an CarePlan resource. Example output: ```json { 'resourceType': 'Parameters', 'parameter': [ { 'name': 'return', 'resource': { { 'resourceType': 'CarePlan', 'id': '30', 'meta': { 'versionId': '1', 'lastUpdated': '2019-04-11T10:55:30.374+00:00', 'profile': [ 'http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careplan' ] }, 'contained': [ { 'resourceType': 'Condition', 'id': '1', 'clinicalStatus': 'active', 'subject': { 'reference': 'http://ehealth.sundhed.dk/patient/fhir/Patient/46216' }, 'assertedDate': '2019-04-11T12:55:30+02:00' } ], 'definition': [ { 'reference': 'http://ehealth.sundhed.dk/hapi-fhir-server/fhir/PlanDefinition/23' } ], 'status': 'active', 'intent': 'order', 'category': [ { 'coding': [ { 'system': 'http://snomed.info/sct', 'code': '412776001', 'display': 'Chronic obstructive pulmonary disease clinical management plan' } ] } ], 'subject': { 'reference': 'http://ehealth.sundhed.dk/patient/fhir/Patient/10016' }, 'context': { 'reference': 'http://ehealth.sundhed.dk/episodeofcare/fhir/EpisodeOfCare/24' }, 'period': { 'start': '2019-04-11T10:55:30+00:00' }, 'addresses': [ { 'reference': '#1' } ], 'activity': [ { 'reference': { 'reference': 'http://ehealth.sundhed.dk/procedurerequest/fhir/ProcedureRequest/28' } }, { 'reference': { 'reference': 'http://ehealth.sundhed.dk/procedurerequest/fhir/ProcedureRequest/29' } } ] } } ] } ``` "/> <idempotent value="false"/> <code value="apply"/> <resource value="PlanDefinition"/> <system value="false"/> <type value="false"/> <instance value="true"/> <parameter> <name value="episodeOfCare"/> <use value="in"/> <min value="1"/> <max value="1"/> <type value="Reference"/> </parameter> <parameter> <name value="return"/> <use value="out"/> <min value="0"/> <max value="1"/> <type value="Parameters"/> </parameter> </OperationDefinition>