Closed f-odhiambo closed 1 year ago
Makes sense to handle this just in case. We'd also want some server side check to prevent bad structure maps from getting synced down in the first place
Reopening this issue as it is still recurrent cc @SebaMutuku
@FikriMilano Kindly take note, you can also have a pairing with Sebastian on the same
@f-odhiambo Is https://github.com/opensrp/fhircore/issues/2094 the ONLY reason why this ticket was reopened? Or is there something else?
Initially we wanted to add an error handling mechanism to stop the app from crashing in the event a structuremap was not provided for a Questionnaire. This issue is still persistent thus reopened
Ah ok, good catch
Can you include an example of how to recreate the error?
On Mar 8, 2023, at 07:20, Francis Odhiambo Otieno @.***> wrote:
Initially we wanted to add an error handling mechanism to stop the app from crashing in the event a structuremap was not provided for a Questionnaire. This issue is still persistent thus reopened
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Can you include an example of how to recreate the error? … On Mar 8, 2023, at 07:20, Francis Odhiambo Otieno @.***> wrote: Initially we wanted to add an error handling mechanism to stop the app from crashing in the event a structuremap was not provided for a Questionnaire. This issue is still persistent thus reopened — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
Here is a sample
{
"resourceType": "Questionnaire",
"language": "en-GB",
"id": "126123",
"title": "ANC Quick Check form",
"description": "ANC Quick Check form",
"version": "0.0.1",
"status": "active",
"publisher": "ONA",
"meta": {
"versionId": "2",
"lastUpdated": "2023-01-31T09:45:01.399+00:00",
"source": "#fc8813d65b16360d"
},
"useContext": [
{
"code": {
"system": "http://hl7.org/fhir/ValueSet/usage-context-type",
"code": "focus",
"display": "Clinical Focus"
},
"valueCodeableConcept": {
"coding": [
{
"system": "urn:oid:2.16.578.1.12.4.1.1.8655",
"display": "ANC Quick Check form"
}
]
}
}
],
"contact": [
{
"name": "http://www.smartregister.org/"
}
],
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-targetStructureMap",
"valueCanonical": "https://ecbis-preview.smartregister.org:443/fhir/"
}
],
"date": "2023-01-26T00:00:00Z",
"item": [
{
"linkId": "3357ef87-02e8-4824-8617-985b3c42513a",
"text": "Visit Date",
"type": "date",
"required": false
},
{
"linkId": "fd03985c-fa98-4a2f-c60f-b85674ed2973",
"text": "Reasons for coming to a health facility",
"type": "string",
"required": false
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control",
"code": "radio-button"
}
]
}
}
],
"linkId": "7717649c-0ba2-4f18-a323-8e43fdf6b514",
"text": "Health problem",
"type": "choice",
"required": false,
"answerOption": [
{
"valueCoding": {
"id": "32812b57-5b9e-4603-e2d5-93c50f360ed8",
"system": "urn:uuid:170c0f51-97fc-412f-8c1a-88a6fd45a46d",
"code": "yes",
"display": "Yes"
}
},
{
"valueCoding": {
"id": "7cdb8a0d-ded1-4d52-c1f8-6b6441c36a04",
"system": "urn:uuid:170c0f51-97fc-412f-8c1a-88a6fd45a46d",
"code": "no",
"display": "No"
}
}
]
},
{
"linkId": "83a218a5-c328-41f1-89e3-11db07d50119",
"text": "Specify the problem",
"type": "string",
"enableWhen": [
{
"question": "7717649c-0ba2-4f18-a323-8e43fdf6b514",
"operator": "=",
"answerCoding": {
"system": "urn:uuid:170c0f51-97fc-412f-8c1a-88a6fd45a46d",
"code": "yes"
}
}
],
"required": false
},
{
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/ValueSet/questionnaire-item-control",
"code": "check-box"
}
]
}
}
],
"linkId": "dd029ed2-e3ef-48c2-a320-fbf367161422",
"text": "Danger Signs",
"type": "choice",
"required": false,
"answerOption": [
{
"valueCoding": {
"id": "8409d046-c027-4309-8071-3f5830bc20ca",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"code": "1",
"display": "None"
}
},
{
"valueCoding": {
"id": "4b7eaa0a-f22a-4a8f-83af-bc6ab6485add",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"code": "2",
"display": "Bleeding Vaginally"
}
},
{
"valueCoding": {
"id": "4183ad6b-9d2a-4a04-f76d-d8a3a8d8f749",
"code": "3",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Central Cyanosis"
}
},
{
"valueCoding": {
"id": "1e1ffb3f-932b-45ea-faff-b6e02fdc5648",
"code": "4",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Convulsing"
}
},
{
"valueCoding": {
"id": "751318e3-7a9c-48eb-ac3f-8e3e7da51a4c",
"code": "5",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Fever"
}
},
{
"valueCoding": {
"id": "d1e576ab-1039-46b8-a59c-7b9ca2f388db",
"code": "6",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Server Headache"
}
},
{
"valueCoding": {
"id": "13175f85-17e7-49d5-be55-1297f8d05235",
"code": "7",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Visual disturbance"
}
},
{
"valueCoding": {
"id": "10894401-80c7-4b9e-ecbe-320f12a7187d",
"code": "8",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Imminent delivery"
}
},
{
"valueCoding": {
"id": "c58ecbeb-fafb-4061-d58f-ed3816837f74",
"code": "9",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Labour"
}
},
{
"valueCoding": {
"id": "2a4b833a-f29f-462d-892b-4742cb11eb03",
"code": "10",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Looks very ill"
}
},
{
"valueCoding": {
"id": "eb8ec7e9-6377-4506-88c6-ba29d5bb824d",
"code": "11",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Severe pain "
}
},
{
"valueCoding": {
"id": "d79be354-517f-4e2a-8317-245d10d487be",
"code": "12",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Severe abdominal pain"
}
},
{
"valueCoding": {
"id": "4ee17311-97cb-4336-99d3-5c6df28557d8",
"code": "13",
"system": "urn:uuid:79d97c9e-2ee8-439d-859f-109af2247bd4",
"display": "Unconscious"
}
}
]
}
]
}
CC @pld @SebaMutuku @FikriMilano
Name of feature to enhance Provide error handling if StructureMap has an error during the extraction process
Description of feature Add a mechanism to prevent a crash when there is an issue with the StructureMap and also log/provide feedback for action
Describe the enhancement