This page is part of the FUT Infrastructure (v3.3.0: Release) based on FHIR (HL7® FHIR® Standard) R4. This is the current published version. For a full list of available versions, see the Directory of published versions
POST [base]/$create-episode-of-care
Header
Accept-Charset: utf-8
Authorization: Bearer eyJhbGciOiJub25lIn0.eyJ1c2VyX2lkIjoiaHR0cHM6Ly9wYXRpZW50LmNpdC1jYXJlcGxhbi0yODE4LmxvY2FsL2ZoaXIvUGF0aWVudC84MzQzOCIsInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJFcGlzb2RlT2ZDYXJlJGNyZWF0ZS1lcGlzb2RlLW9mLWNhcmUiXX0sImNvbnRleHQiOnsiY2FyZV90ZWFtX2lkIjoiaHR0cHM6Ly9vcmdhbml6YXRpb24uY2l0LWNhcmVwbGFuLTI4MTgubG9jYWwvZmhpci9DYXJlVGVhbS84MTcyNCIsInBhdGllbnRfaWQiOiJodHRwczovL3BhdGllbnQuY2l0LWNhcmVwbGFuLTI4MTgubG9jYWwvZmhpci9QYXRpZW50LzgzNDM4IiwidGVhbV9vbl9lb2MiOmZhbHNlfSwidXNlcl90eXBlIjoiUFJBQ1RJVElPTkVSIn0.
Accept: application/fhir+json;q=1.0, application/json+fhir;q=0.9
User-Agent: HAPI-FHIR/6.10.5 (FHIR Client; FHIR 4.0.1/R4; apache)
Prefer: return=representation
Accept-Encoding: gzip
Content-Type: application/fhir+json; charset=UTF-8
Body:
{
"resourceType": "Parameters",
"parameter": [
{
"name": "episodeOfCareAndProvenances",
"resource": {
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:d785a0cf-7a84-4639-8394-34b606ccb083",
"resource": {
"resourceType": "Provenance",
"meta": {
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
]
},
"target": [
{
"reference": "urn:uuid:736f3ace-1ca5-44c4-a0c5-4fe54f6fe7cd"
}
],
"recorded": "2024-07-29T12:59:47.777+00:00",
"policy": [
"http://ehealth.sundhed.dk/policy/dk/sundhedsloven"
],
"agent": [
{
"who": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
}
}
]
},
"request": {
"method": "POST",
"url": "Provenance"
}
},
{
"fullUrl": "urn:uuid:736f3ace-1ca5-44c4-a0c5-4fe54f6fe7cd",
"resource": {
"resourceType": "EpisodeOfCare",
"meta": {
"lastUpdated": "2024-07-29T12:59:47.777+00:00",
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare"
]
},
"extension": [
{
"url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare-caremanagerOrganization",
"valueReference": {
"reference": "https://organization.cit-careplan-2818.local/fhir/Organization/34670"
}
}
],
"status": "planned",
"diagnosis": [
{
"condition": {
"reference": "urn:uuid:72725c76-cde9-48db-ba28-bd98795138cf"
}
}
],
"patient": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
},
"managingOrganization": {
"reference": "https://organization.cit-careplan-2818.local/fhir/Organization/34670"
},
"period": {
"start": "1970-01-01T00:00:01+00:00",
"end": "1970-01-01T00:01:40+00:00"
},
"team": [
{
"reference": "https://organization.cit-careplan-2818.local/fhir/CareTeam/81724"
}
]
},
"request": {
"method": "POST",
"url": "EpisodeOfCare"
}
},
{
"fullUrl": "urn:uuid:72725c76-cde9-48db-ba28-bd98795138cf",
"resource": {
"resourceType": "Condition",
"meta": {
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-condition"
]
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
"valueReference": {
"reference": "urn:uuid:736f3ace-1ca5-44c4-a0c5-4fe54f6fe7cd"
}
}
],
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
"code": "active"
}
]
},
"code": {
"coding": [
{
"system": "urn:oid:1.2.208.176.2.4",
"code": "DJ44"
}
]
},
"subject": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
}
},
"request": {
"method": "POST",
"url": "Condition"
}
}
]
}
}
]
}
Response
{
"resourceType": "Bundle",
"type": "transaction-response",
"entry": [
{
"resource": {
"resourceType": "Provenance",
"id": "74",
"meta": {
"versionId": "1",
"lastUpdated": "2024-07-29T12:59:47.884+00:00",
"source": "#5d7a12b0-f213-4f99-95de-5024f837cf6b",
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
]
},
"target": [
{
"reference": "https://careplan.cit-careplan-2818.local/fhir/EpisodeOfCare/75"
}
],
"recorded": "2024-07-29T12:59:47.777+00:00",
"policy": [
"http://ehealth.sundhed.dk/policy/dk/sundhedsloven"
],
"agent": [
{
"who": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
}
}
]
},
"response": {
"status": "201 Created",
"location": "https://careplan.cit-careplan-2818.local/fhir/Provenance/74/_history/1",
"etag": "1",
"lastModified": "2024-07-29T12:59:47.884+00:00",
"outcome": {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td>Successfully created resource "Provenance/74/_history/1". Took 6ms.</td></tr></table></div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"coding": [
{
"system": "https://hapifhir.io/fhir/CodeSystem/hapi-fhir-storage-response-code",
"code": "SUCCESSFUL_CREATE",
"display": "Create succeeded."
}
]
},
"diagnostics": "Successfully created resource \"Provenance/74/_history/1\". Took 6ms."
}
]
}
}
},
{
"resource": {
"resourceType": "EpisodeOfCare",
"id": "75",
"meta": {
"versionId": "1",
"lastUpdated": "2024-07-29T12:59:47.884+00:00",
"source": "#5d7a12b0-f213-4f99-95de-5024f837cf6b",
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare"
]
},
"extension": [
{
"url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-episodeofcare-caremanagerOrganization",
"valueReference": {
"reference": "https://organization.cit-careplan-2818.local/fhir/Organization/34670"
}
},
{
"url": "http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-teamHistory",
"extension": [
{
"url": "careTeam",
"valueReference": {
"reference": "https://organization.cit-careplan-2818.local/fhir/CareTeam/81724"
}
},
{
"url": "period",
"valuePeriod": {
"start": "2024-07-29T12:59:47+00:00"
}
}
]
}
],
"status": "planned",
"statusHistory": [
{
"status": "planned",
"period": {
"start": "2024-07-29T12:59:47+00:00"
}
}
],
"diagnosis": [
{
"condition": {
"reference": "https://careplan.cit-careplan-2818.local/fhir/Condition/76"
}
}
],
"patient": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
},
"managingOrganization": {
"reference": "https://organization.cit-careplan-2818.local/fhir/Organization/34670"
},
"period": {
"start": "1970-01-01T00:00:01+00:00",
"end": "1970-01-01T00:01:40+00:00"
},
"team": [
{
"reference": "https://organization.cit-careplan-2818.local/fhir/CareTeam/81724"
}
]
},
"response": {
"status": "201 Created",
"location": "https://careplan.cit-careplan-2818.local/fhir/EpisodeOfCare/75/_history/1",
"etag": "1",
"lastModified": "2024-07-29T12:59:47.884+00:00",
"outcome": {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td>Successfully created resource "EpisodeOfCare/75/_history/1". Took 4ms.</td></tr></table></div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"coding": [
{
"system": "https://hapifhir.io/fhir/CodeSystem/hapi-fhir-storage-response-code",
"code": "SUCCESSFUL_CREATE",
"display": "Create succeeded."
}
]
},
"diagnostics": "Successfully created resource \"EpisodeOfCare/75/_history/1\". Took 4ms."
}
]
}
}
},
{
"resource": {
"resourceType": "Condition",
"id": "76",
"meta": {
"versionId": "1",
"lastUpdated": "2024-07-29T12:59:47.884+00:00",
"source": "#5d7a12b0-f213-4f99-95de-5024f837cf6b",
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-condition"
]
},
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/workflow-episodeOfCare",
"valueReference": {
"reference": "https://careplan.cit-careplan-2818.local/fhir/EpisodeOfCare/75"
}
}
],
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
"code": "active"
}
]
},
"code": {
"coding": [
{
"system": "urn:oid:1.2.208.176.2.4",
"code": "DJ44"
}
]
},
"subject": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
}
},
"response": {
"status": "201 Created",
"location": "https://careplan.cit-careplan-2818.local/fhir/Condition/76/_history/1",
"etag": "1",
"lastModified": "2024-07-29T12:59:47.884+00:00",
"outcome": {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td>Successfully created resource "Condition/76/_history/1". Took 8ms.</td></tr></table></div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"coding": [
{
"system": "https://hapifhir.io/fhir/CodeSystem/hapi-fhir-storage-response-code",
"code": "SUCCESSFUL_CREATE",
"display": "Create succeeded."
}
]
},
"diagnostics": "Successfully created resource \"Condition/76/_history/1\". Took 8ms."
}
]
}
}
},
{
"resource": {
"resourceType": "Provenance",
"id": "77",
"meta": {
"versionId": "1",
"lastUpdated": "2024-07-29T12:59:47.884+00:00",
"source": "#5d7a12b0-f213-4f99-95de-5024f837cf6b",
"profile": [
"http://ehealth.sundhed.dk/fhir/StructureDefinition/ehealth-provenance"
]
},
"target": [
{
"reference": "https://careplan.cit-careplan-2818.local/fhir/EpisodeOfCare/75"
}
],
"recorded": "2024-07-29T12:59:47.884+00:00",
"policy": [
"http://ehealth.sundhed.dk/policy/ehealth/patient-data",
"http://ehealth.sundhed.dk/policy/eu/general-data-protection-regulation"
],
"reason": [
{
"coding": [
{
"system": "http://hl7.org/fhir/v3/ActReason",
"code": "PATADMIN"
}
]
}
],
"activity": {
"coding": [
{
"system": "http://hl7.org/fhir/v3/DataOperation",
"code": "CREATE"
}
]
},
"agent": [
{
"role": [
{
"coding": [
{
"system": "http://hl7.org/fhir/v3/ParticipationType",
"code": "AUT"
}
]
}
],
"who": {
"reference": "https://patient.cit-careplan-2818.local/fhir/Patient/83438"
}
}
]
},
"response": {
"status": "201 Created",
"location": "https://careplan.cit-careplan-2818.local/fhir/Provenance/77/_history/1",
"etag": "1",
"lastModified": "2024-07-29T12:59:47.884+00:00",
"outcome": {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td>Successfully created resource "Provenance/77/_history/1". Took 6ms.</td></tr></table></div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"coding": [
{
"system": "https://hapifhir.io/fhir/CodeSystem/hapi-fhir-storage-response-code",
"code": "SUCCESSFUL_CREATE",
"display": "Create succeeded."
}
]
},
"diagnostics": "Successfully created resource \"Provenance/77/_history/1\". Took 6ms."
}
]
}
}
}
]
}