Stream: implementers
Topic: Communication - attachment and description
Jose Costa Teixeira (Jun 26 2019 at 09:49):
Hi. according to this,
pasted image
Jose Costa Teixeira (Jun 26 2019 at 09:49):
shouldn't this be a valid payload? - one image (Attachment) and a text description (CodeableConcept)
"payload": [
{
"contentAttachment": {...},
{
"contentCodeableConcept": {
"text": "Keep Patient warm"
}
}
]
Jose Costa Teixeira (Jun 26 2019 at 12:47):
The R4 test server rejects it, not sure if it is the server or if this should not be allowed.
Lloyd McKenzie (Jun 26 2019 at 14:35):
You're missing a closing bracket following contentAttachment before the comma.
Jose Costa Teixeira (Jun 26 2019 at 14:40):
aargh... correct, i did not copy-paste that here.
Jose Costa Teixeira (Jun 26 2019 at 14:41):
my json syntax was correct in postman - i just made a mistake in copy-paste here
Jose Costa Teixeira (Jun 26 2019 at 14:42):
"payload": [ { "contentAttachment": { "contentType": "image/jpeg", "data": "/9j/.../Z", "title": "keep warm.jpg", "creation": "2010-02-01T11:50:23-05:00" } }, { "contentCodeableConcept": { "text": "Keep Patient warm" } } ]
Jose Costa Teixeira (Jun 26 2019 at 14:43):
this fails
Lloyd McKenzie (Jun 26 2019 at 14:57):
With what message?
Jose Costa Teixeira (Jun 26 2019 at 16:42):
{ "severity": "error", "code": "structure", "details": { "text": "Unrecognised prop \"contentCodeableConcept\" at line 49 col 8" }, "location": [ "/Communication/payload" ] },
Jose Costa Teixeira (Jun 26 2019 at 16:43):
{ "severity": "error", "code": "invariant", "details": { "text": "All FHIR elements must have a @value or children () hasValue() or (children().count() > id.count())" }, "location": [ "Communication.payload[1]" ], "expression": [ "Communication.payload[1] // line 48 col 6)" ] }, { "severity": "error", "code": "structure", "details": { "text": "Profile http://hl7.org/fhir/StructureDefinition/Communication, Element \"Communication.payload[1].content[x]\" (Communication.payload.content[x]): minimum required = 1, but only found 0" }, "location": [ "Communication.payload[1]" ], "expression": [ "Communication.payload[1] // line 48 col 6)" ] }
Jose Costa Teixeira (Jun 26 2019 at 16:44):
am i doing something wrong, or is the server ?
Lloyd McKenzie (Jun 26 2019 at 16:56):
CodeableConcept is new for R5. The server is probably R4
Jose Costa Teixeira (Jun 26 2019 at 17:00):
aaaahh. thanks
Last updated: Apr 12 2022 at 19:14 UTC