eHealth Infrastructure (v2019.5.1)


<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.1"/>
  <name value="apply"/>
  <status value="active"/>
  <kind value="operation"/>
  <date value="2019-05-16T12:32:10+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
{
  &#39;resourceType&#39;: &#39;Parameters&#39;,
  &#39;parameter&#39;: [
    {
      &#39;name&#39;: &#39;episodeOfCare&#39;,
      &#39;valueReference&#39;: {
        &#39;reference&#39;: &#39;http://local.ehealth.sundhed.dk:31380/hapi-fhir-server/fhir/EpisodeOfCare/38&#39;
      }
    }
  ]
}
```

### Output description
Upon success this operation returns an CarePlan resource.

Example output:

```json
{
  &#39;resourceType&#39;: &#39;Parameters&#39;,
  &#39;parameter&#39;: [
    {
      &#39;name&#39;: &#39;return&#39;,
      &#39;resource&#39;: {
      {
        &#39;resourceType&#39;: &#39;CarePlan&#39;,
        &#39;id&#39;: &#39;30&#39;,
        &#39;meta&#39;: {
          &#39;versionId&#39;: &#39;1&#39;,
          &#39;lastUpdated&#39;: &#39;2019-04-11T10:55:30.374+00:00&#39;,
          &#39;profile&#39;: [
            &#39;http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-careplan&#39;
          ]
        },
        &#39;contained&#39;: [
          {
            &#39;resourceType&#39;: &#39;Condition&#39;,
            &#39;id&#39;: &#39;1&#39;,
            &#39;clinicalStatus&#39;: &#39;active&#39;,
            &#39;subject&#39;: {
              &#39;reference&#39;: &#39;http://ehealth.sundhed.dk/patient/fhir/Patient/46216&#39;
            },
            &#39;assertedDate&#39;: &#39;2019-04-11T12:55:30+02:00&#39;
          }
        ],
        &#39;definition&#39;: [
          {
            &#39;reference&#39;: &#39;http://ehealth.sundhed.dk/hapi-fhir-server/fhir/PlanDefinition/23&#39;
          }
        ],
        &#39;status&#39;: &#39;active&#39;,
        &#39;intent&#39;: &#39;order&#39;,
        &#39;category&#39;: [
          {
            &#39;coding&#39;: [
              {
                &#39;system&#39;: &#39;http://snomed.info/sct&#39;,
                &#39;code&#39;: &#39;412776001&#39;,
                &#39;display&#39;: &#39;Chronic obstructive pulmonary disease clinical management plan&#39;
              }
            ]
          }
        ],
        &#39;subject&#39;: {
          &#39;reference&#39;: &#39;http://ehealth.sundhed.dk/patient/fhir/Patient/10016&#39;
        },
        &#39;context&#39;: {
          &#39;reference&#39;: &#39;http://ehealth.sundhed.dk/episodeofcare/fhir/EpisodeOfCare/24&#39;
        },
        &#39;period&#39;: {
          &#39;start&#39;: &#39;2019-04-11T10:55:30+00:00&#39;
        },
        &#39;addresses&#39;: [
          {
            &#39;reference&#39;: &#39;#1&#39;
          }
        ],
        &#39;activity&#39;: [
          {
            &#39;reference&#39;: {
              &#39;reference&#39;: &#39;http://ehealth.sundhed.dk/procedurerequest/fhir/ProcedureRequest/28&#39;
            }
          },
          {
            &#39;reference&#39;: {
              &#39;reference&#39;: &#39;http://ehealth.sundhed.dk/procedurerequest/fhir/ProcedureRequest/29&#39;
            }
          }
        ]
      }
    }
  ]
}
```

"/>
  <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>