Create CONTRIBUTION
We will use the relaxed CONTRIBUTION with the following optional attributes:
uid: when provided, it will be accepted in case is not in-use, otherwise error will be returnedaudit.time_committed: server will always set itaudit.system_id: when provided, it will be validated
Headers
- Type: stringenum
Prefer Request header to indicate the preference over response details. The response will contain the entire resource when the
Preferheader has a value ofreturn=representation, or only the resource identifier (e.g., theuid) when the value isreturn=identifier.valuesreturn=representation return=minimal return=identifier
Body
required
application/json
The CONTRIBUTION.
A new (un-committed) CONTRIBUTION resource for Demographic
- Type: object · UPDATE_AUDIT
audit requiredThe set of attributes required to document the committal of an information item to a repository. Used by the server to create an AUDIT_DETAILS object.
- Type: array object[] · UPDATE_VERSION[]
versions required - Type: object · HIER_OBJECT_ID
uid
Responses
- application/json
- application/json
409 409 Conflictis returned when a resource with same identifier(s) already exists.
Request Example for post/demographic/contribution
curl https://cataniamc.prod.cadasto.com/v1/demographic/contribution \
--request POST \
--header 'Prefer: return=minimal' \
--header 'Content-Type: application/json' \
--data '{
"uid": {
"_type": "HIER_OBJECT_ID",
"value": ""
},
"versions": [
{
"preceding_version_uid": {
"_type": "OBJECT_VERSION_ID",
"value": ""
},
"signature": "",
"lifecycle_state": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"attestations": [
{
"_type": "UPDATE_ATTESTATION",
"change_type": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"description": {},
"committer": {},
"attested_view": {
"_type": "DV_MULTIMEDIA",
"charset": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"language": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"alternate_text": "",
"uri": {},
"data": "",
"media_type": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"compression_algorithm": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"integrity_check": "",
"integrity_check_algorithm": {
"terminology_id": {
"_type": "TERMINOLOGY_ID",
"value": ""
},
"code_string": "",
"preferred_term": ""
},
"thumbnail": {},
"size": 1
},
"proof": "",
"items": [
{
"_type": "DV_EHR_URI",
"value": ""
}
],
"reason": {},
"is_pending": true
}
],
"data": {},
"commit_audit": {
"_type": "UPDATE_AUDIT",
"change_type": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"description": {},
"committer": {}
}
}
],
"audit": {
"_type": "UPDATE_AUDIT",
"change_type": {
"terminology_id": "",
"terminology_version": "",
"code_string": "",
"uri": ""
},
"description": {},
"committer": {}
}
}'
{
"uid": {
"value": "0826851c-c4c2-4d61-92b9-410fb8275ff0"
},
"versions": [
{
"id": {
"_type": "OBJECT_VERSION_ID",
"value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::cataniamc.prod.cadasto.com::1"
},
"namespace": "local",
"type": "COMPOSITION"
},
{
"id": {
"_type": "OBJECT_VERSION_ID",
"value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::cataniamc.prod.cadasto.com::1"
},
"namespace": "local",
"type": "FOLDER"
}
],
"audit": {
"system_id": "9624982A-9F42-41A5-9318-AE13D5F5031F",
"committer": {
"_type": "PARTY_IDENTIFIED",
"name": "A user name"
},
"time_committed": {
"value": "2017-08-15T10:37:15.422+02:00"
},
"change_type": {
"value": "creation",
"defining_code": {
"terminology_id": {
"value": "openehr"
},
"code_string": "249"
}
},
"description": {
"value": "Description text"
}
}
}