Hi @mseaton @ibacher Am working on the submitting the dispense form and a hit a bit of a hiccup with submitting the data. I’ve been using this documentation as a reference for what data to submit. Been having trouble trying to figure out what data to submit and after crawling a number of wiki’s i came up with these issues that maybe you could help throw some light on:
-
Based on the structure, it looks like MedicationDispense has most fields similar to MedicationRequest except for the substitution related fields so does that mean in a form dispense with multiple drugs, are each of them treated as different records?
-
The form has a field internalNotes , the closest to anything i came across regarding that field was a comment by @mogoodrich suggesting it to be added to the note field in the
MedicationDispense
. Is this the intended behaviour and in the case of multiple drugs in a single form, should each of them use the value from this field? -
What data does the POST expect? I tried to replicate the structure of request body and even came across a postman collection like the one below but kept getting this error when testing with postman;
REQUEST BODY
{
"resourceType": "<string>",
"id": "<string>",
"text": {
"status": "<string>",
"div": "<string>"
},
"status": "<string>",
"medicationReference": {
"reference": "<string>",
"_reference": {
"fhir_comments": [
"<object>",
"<object>"
]
},
"display": "<string>"
},
"patient": {
"reference": "<string>"
},
"dispenser": {
"reference": "<string>"
},
"authorizingPrescription": [
{
"reference": "<string>"
}
],
"type": {
"coding": [
{
"system": "<string>",
"code": "<string>",
"display": "<string>"
}
]
},
"quantity": {
"value": "<number>",
"unit": "<string>",
"system": "<string>",
"code": "<string>"
},
"daysSupply": {
"value": "<number>",
"unit": "<string>",
"system": "<string>",
"code": "<string>"
},
"whenPrepared": "<string>",
"whenHandedOver": "<string>",
"dosageInstruction": [
{
"additionalInstructions": {
"coding": [
{
"system": "<string>",
"code": "<string>",
"display": "<string>"
}
]
},
"timing": {
"repeat": {
"frequency": {
"value": "<Error: Too many levels of nesting to fake this schema>"
},
"period": {
"value": "<Error: Too many levels of nesting to fake this schema>"
},
"periodUnit": {
"value": "<Error: Too many levels of nesting to fake this schema>"
}
}
},
"siteCodeableConcept": {
"coding": [
{
"system": "<string>",
"code": "<string>",
"display": "<string>"
}
]
},
"route": {
"coding": [
{
"system": "<string>",
"code": "<string>",
"display": "<string>"
}
]
},
"doseQuantity": {
"value": "<number>",
"unit": "<string>",
"system": "<string>",
"code": "<string>"
}
}
]
}
RESPONSE BODY
{
"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;\">ERROR</td><td>[]</td><td><pre>Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[MedicationDispense] with parameters [[medication]]</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "not-supported",
"diagnostics": "Invalid request: The FHIR endpoint on this server does not know how to handle POST operation[MedicationDispense] with parameters [[medication]]"
}
]
}
cc: @eudson