opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://opensrp.io
Apache License 2.0
56 stars 56 forks source link

Quest/MSF - Extract a Condition resource if patient is Diagnosed once survey is done #689

Closed f-odhiambo closed 2 years ago

f-odhiambo commented 2 years ago

Is your feature request related to a problem? Please describe. Add the ability to save the Diagnosed content from the MSF survey in the Quest app

Describe the solution you'd like

  1. Select Is child responsive
  2. Complete survey
  3. Once the survey is complete save the QuesionnaireRresponse
  4. Extract the details from the QR to generate a condition linked to the patient either Acute Ear Infection or Viral Ear Infection
  5. Possible Diagnosis
    • For Unclassiefed Ear infection - No extraction
    • For Acute Ear infection -Extract a Condition resource and link to patient
    • For Viral Ear infection - Extract a Condition resource and link to patient

Describe alternatives you've considered Choose the appropriate extraction method and save the Condition resource linked to a patient. This will allow one to view Condition on the FHIR Web portal

Additional context N/A

SNOMED Codes

Name: Acute viral otitis externa
Concept ID: 232222008 Read Codes: X00i6 ICD-10 Codes: H603

Name: Viral ear infection (disorder) See more descriptions. Concept ID: 312137007 Read Codes: FyuP4 XaDcY ICD-10 Codes: H669

maimoonak commented 2 years ago

@f-odhiambo Few things I have noticed into MSF Questionnaire https://fhir.labs.smartregister.org/fhir/Questionnaire/3748

maimoonak commented 2 years ago

Found an SDK issue but not sure if due to huge questionnaire or any skip logic.

Select Responsive -> select No i.e. 2nd item in choice. -> It does not get slected, unless you click first element once and then select 2nd element

maimoonak commented 2 years ago

A. Questionnaire taking long to load

B. In questionnaire-response an item of type display is saved like below: {"linkId":"11c83e68-a609-4324-a920-02ea78b00110"}

This does not make sense as it should store text/code/anything else to depict meaningful info

maimoonak commented 2 years ago

@f-odhiambo Just figured out that the answer mapping is on coding http://hl7.org/fhir/questionnaire.html and it can be mapped onto one code only. Condition can be mapped on CodeableConcept and multiple codes... https://www.hl7.org/fhir/condition.html . What should be the primary mapping for questionnaire and response?

SNOMED system = https://www.snomed.org ICD 10 system = https://icd.codes/icd10cm Read system = https://bioportal.bioontology.org/ontologies/RCD

f-odhiambo commented 2 years ago

@f-odhiambo Just figured out that the answer mapping is on coding http://hl7.org/fhir/questionnaire.html and it can be mapped onto one code only. Condition can be mapped on CodeableConcept and multiple codes... https://www.hl7.org/fhir/condition.html . What should be the primary mapping for questionnaire and response?

SNOMED system = https://www.snomed.org ICD 10 system = https://icd10cmtool.cdc.gov/?fy=FY2022 Read system = https://bioportal.bioontology.org/ontologies/RCD

use SNOMED system = https://www.snomed.org for now as the default reference

maimoonak commented 2 years ago

@f-odhiambo Looks like the questionnaire is designed in a way that just replicates a paper form.

The display 'Acute ear infection' is used in 3 places which does not make sense as it should ideally be only one question with same code with a skip logic that handles it for all cases

pld commented 2 years ago

This is a StructureMap only and no-code issue, correct? I think this depends on #594 and being apple to sync and link StructureMaps correctly

My understanding is that this is a nice-to-have for MSF not a req

maimoonak commented 2 years ago

@f-odhiambo there are four conclusion derived from survey

Acute ear infection (mapping provided above) Viral ear infection (mapping provided above) Chronic ear infection (missing mapping) Unclassified ear problem (mapping not needed)

Plz verify if 'Chronic ear infection' is supposed to be ignored and not marked as condition?

maimoonak commented 2 years ago

This is a StructureMap only and no-code issue, correct? I think this depends on #594 and being apple to sync and link StructureMaps correctly

My understanding is that this is a nice-to-have for MSF not a req

Yes... written a structure map for this. A structure map is directly linked with questionnaire and does not need other reference. We need to look into sync strategy though. Not complete but you can look into the approach here. Currently stuck with the conversion between lists of different types for code.

f-odhiambo commented 2 years ago

@f-odhiambo there are four conclusions derived from the survey

Acute ear infection (mapping provided above) Viral ear infection (mapping provided above) Chronic ear infection (missing mapping) Unclassified ear problem (mapping not needed)

Plz verify if 'Chronic ear infection' is supposed to be ignored and not marked as a condition?

  1. Acute ear infection (mapping provided above) - Extract and create a Condition resource
  2. Viral ear infection (mapping provided above) - Extract and create a Condition resource
  3. Chronic ear infection (missing mapping) - Extract and create a Condition resource
  4. Unclassified ear problem (mapping not needed) - No extraction as the patient is not diagnosed, save items to QuestionnaireReponse
f-odhiambo commented 2 years ago

Here are the codable concepts for Ear Infections

Acute ear infection - https://snomedbrowser.com/Codes/Details/232222008 Name: Acute viral otitis externa
Concept ID: 232222008 Read Codes: X00i6 ICD-10 Codes: H603

Viral ear infection - https://snomedbrowser.com/Codes/Details/409711008 Name: Viral labyrinthitis (disorder) See more descriptions. Concept ID: 409711008 Read Codes: F5635 ICD-10 Codes: H830

Chronic ear infection - https://snomedbrowser.com/Codes/Details/232226006 Name: Chronic viral otitis externa See more descriptions. Concept ID: 232226006 Read Codes: X00iA ICD-10 Codes: H621A B349D B349D H621A

Unclassified ear problem No Codes

maimoonak commented 2 years ago

@f-odhiambo

This is generated from structuremap. Looks ok?

{"resourceType":"Condition", "id":"1a0031cf-adfd-4e73-aa58-cbfb62e1a93f", "clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-clinical","code":"active","display":"Active"}]},

"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}]},

"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}]}],

"code":{"coding":[{"system":"https://www.snomed.org","code":"232222008"},{"system":"https://bioportal.bioontology.org/ontologies/RCD","code":"X00i6"},{"system":"https://icd.codes/icd10cm","code":"H603"}],"text":"Acute ear infection"},

"subject":{"reference":"Patient/9e23dd11-322b-4006-9f3f-e39daf851e0f"}, "onsetDateTime":"2021-11-03T21:26:04+05:00"}