eHealth Infrastructure (v2019.5.2)

apply

OPERATION: apply

The official URL for this operation definition is:

http://ehealth.sundhed.dk/fhir/OperationDefinition/PlanDefinition-i-apply

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:

{
  '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:

{
  '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'
            }
          }
        ]
      }
    }
  ]
}

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

Parameters

UseNameCardinalityTypeBindingDocumentation
INepisodeOfCare1..1Reference
OUTreturn0..1Parameters