Create COMPOSITION
Creates the first version of a new COMPOSITION in the EHR identified by ehr_id.
Path Parameters
- Type: stringehr
_id requiredEHR identifier taken from EHR.ehr_id.value.
Headers
- Type: stringenumPrefer
Request header to indicate the preference over response details. The response will contain the entire resource when the
Preferheader has a value ofreturn=representation.values- return=representation
- return=minimal
Body·
required
application/json
The COMPOSITION.
A COMPOSITION resource
- Type: stringarchetype
_node _id required - Type: object · DV_CODED_TEXTcategoryrequired
- composerrequired
- _typeDiscriminatorenumconst:PARTY_SELFrequiredvalues
- P
A R T Y _ S E L F
- externalType: object · PARTY_REF
_ref Identifier for parties in a demographic or identity service.
- Type: array ·contentrequired
- Type: object · EVENT_CONTEXTcontextrequired
- Type: object · CODE_PHRASElanguagerequired
- namerequired
- _typeDiscriminatorenumconst:DV_TEXTrequiredvalues
- D
V _ T E X T
- valueType: stringrequired
- encodingType: object · CODE_PHRASE
- formattingType: string
- hyperlink
- languageType: object · CODE_PHRASE
- mappingsType: array object[] ·
- Type: object · CODE_PHRASEterritoryrequired
- Type: string_type
- Type: object · ARCHETYPEDarchetype
_details - Type: object · FEEDER_AUDITfeeder
_audit - Type: array object[] ·links
Responses
- application/json
- application/json
- 404
404 Not Foundis returned when an EHR withehr_iddoes not exist. - 422
422 Unprocessable Entityis returned when the content could be converted to a COMPOSITION, but there are semantic validation errors, such as the underlying template is not known or is not validating the supplied COMPOSITION.
Request Example for post/ehr/{ehr_id}/composition
curl https://cataniamc.prod.cadasto.com/openehr/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/composition \
--request POST \
--header 'Prefer: return=minimal' \
--header 'Content-Type: application/json' \
--data '{
"archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
"name": {
"value": "Vital Signs"
},
"uid": {
"_type": "OBJECT_VERSION_ID",
"value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1"
},
"archetype_details": {
"archetype_id": {
"value": "openEHR-EHR-COMPOSITION.encounter.v1"
},
"template_id": {
"value": "Example.v1::c7ec861c-c413-39ff-9965-a198ebf44747"
},
"rm_version": "1.0.2"
},
"language": {
"terminology_id": {
"value": "ISO_639-1"
},
"code_string": "en"
},
"territory": {
"terminology_id": {
"value": "ISO_3166-1"
},
"code_string": "NL"
},
"category": {
"value": "event",
"defining_code": {
"terminology_id": {
"value": "openehr"
},
"code_string": "433"
}
},
"composer": {
"_type": "PARTY_IDENTIFIED",
"external_ref": {
"id": {
"_type": "GENERIC_ID",
"value": "16b74749-e6aa-4945-b760-b42bdc07098a",
"scheme": "pid"
},
"namespace": "cataniamc.prod.cadasto.com",
"type": "PERSON"
},
"name": "A name"
},
"context": {
"start_time": {
"value": "2014-11-18T09:50:35.000+01:00"
},
"setting": {
"value": "other care",
"defining_code": {
"terminology_id": {
"value": "openehr"
},
"code_string": "238"
}
}
},
"content": []
}'
{
"archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
"name": {
"value": "Vital Signs"
},
"uid": {
"_type": "OBJECT_VERSION_ID",
"value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1"
},
"archetype_details": {
"archetype_id": {
"value": "openEHR-EHR-COMPOSITION.encounter.v1"
},
"template_id": {
"value": "Example.v1::c7ec861c-c413-39ff-9965-a198ebf44747"
},
"rm_version": "1.0.2"
},
"language": {
"terminology_id": {
"value": "ISO_639-1"
},
"code_string": "en"
},
"territory": {
"terminology_id": {
"value": "ISO_3166-1"
},
"code_string": "NL"
},
"category": {
"value": "event",
"defining_code": {
"terminology_id": {
"value": "openehr"
},
"code_string": "433"
}
},
"composer": {
"_type": "PARTY_IDENTIFIED",
"external_ref": {
"id": {
"_type": "GENERIC_ID",
"value": "16b74749-e6aa-4945-b760-b42bdc07098a",
"scheme": "pid"
},
"namespace": "cataniamc.prod.cadasto.com",
"type": "PERSON"
},
"name": "A name"
},
"context": {
"start_time": {
"value": "2014-11-18T09:50:35.000+01:00"
},
"setting": {
"value": "other care",
"defining_code": {
"terminology_id": {
"value": "openehr"
},
"code_string": "238"
}
}
},
"content": []
}