google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
465 stars 245 forks source link

Initiate new screener encounter #625

Closed fredhersch closed 2 years ago

fredhersch commented 2 years ago

User story As a HCW I can select to initiate a new sceener for a patient generating a new encounter and relevant observations

Steps:

Alt path:

Additional information

santosh-pingle commented 2 years ago

Started looking into it!

santosh-pingle commented 2 years ago

@fredhersch (Starting a new screener loads the FHIR Screener Questionnaire resource) Can you please share Questionnaire resource.

santosh-pingle commented 2 years ago

As per updates received from @jingtang10, extraction of screener questionnaire response is pending for some clarifications on data modelling, therefore we will not have implementation for extraction logic as of now.

santosh-pingle commented 2 years ago

@jingtang10 @fredhersch

Below json file is used to show the screener encounter questionnaire. https://github.com/google/android-fhir/pull/627/files#R1

Once questionnaire response is submitted, next step is to extract the resource from the questionnaire. Currently ResourceMapper.extract() api is used to extract the resource, but it requires Questionnaire.item.definition and extension to extract the resource.

e.g "definition": "http://hl7.org/fhir/StructureDefinition/...

"extension": [ { "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext", "valueExpression": { ....

Therefore requesting you please updates screener encounter json with Questionnaire.item.definition and extension.

jingtang10 commented 2 years ago

Discussed offline. See this comment: https://chat.fhir.org/#narrow/stream/179255-questionnaire/topic/SDC.20Extraction.20examples/near/226341617

It seems to me that the right thing to do is to use each group as an extraction context. and everything within that group gets mapped into the resource for the group. In this questionnaire that's already how things are organized.

santosh-pingle commented 2 years ago

@jingtang10

Can you please provide your feedback/early review comments on below file changes https://github.com/google/android-fhir/compare/sp/multiple-resources-extraction?expand=1

I have updated some of the screener encounter questionnaire items and group item for definition based urls, can you please confirm those? (your input is required regarding definition urls to check whether further changes are required in resource mapper to update resource fields in existing code e.g list of values)

Remaining items still require definition url, can you please provide inputs on it?

santosh-pingle commented 2 years ago

@jingtang10

SDC library ResourceMapper was not updating multiple answers of the given question item to the resource field. Though, response had captured multiple answers, it was only showing the list of first answers in the resource field. => Support is added, it was required to update all selected answers of "symptoms " and "Medical history" in resource.

https://github.com/google/android-fhir/compare/sp/multiple-resources-extraction?expand=1#diff-4d2985aba5e8203b97cc5dc2eac7dbbd0c7832be34a27036d1ecfb8e4a3a3e50L167

santosh-pingle commented 2 years ago

Currently, sdc library does not support the risk assessment as per feedback from Jing, therefore risk related response will not be updated to the resource fields until library supports it.

santosh-pingle commented 2 years ago

Screener encounter questionnaire json need to be updated for below question items for definition base extraction

  1. Covid vaccination
  2. Temperature
  3. Pulse Oximetry

Jing had provided some inputs on it, like adding hidden question, and code item to the questionnaire. Referring documentation for more information on it.

santosh-pingle commented 2 years ago

@jingtang10

We also need to discuss multiple resources mapping just before saving them into the application database. These multiple resources are extracted from resource mapper and returned as bundle. e.g Encounter, Observation resources, Condition.

jingtang10 commented 2 years ago

@jingtang10

We also need to discuss multiple resources mapping just before saving them into the application database. These multiple resources are extracted from resource mapper and returned as bundle. e.g Encounter, Observation resources, Condition.

Great question. There're two approaches to link extracted resources with existing resources

  1. Use hidden questions and pre-population of questionnaire to set the references (in our case patient ID) as answers to the hidden questions so that they will be extracted to the subject field of Observation etc.
  2. Handle these after extraction. This requries the application to know when resource types will be in the bundle and handle them accordingly to populate certain fields (i.e. subject of Observation)

The first approach is more generic and probably more elegant but I'm happy for us to do 2 first and follow up with another change to implement the first one.

jingtang10 commented 2 years ago

Currently, sdc library does not support the risk assessment as per feedback from Jing, therefore risk related response will not be updated to the resource fields until library supports it.

Currently, sdc library does not support the risk assessment as per feedback from Jing, therefore risk related response will not be updated to the resource fields until library supports it.

I think we can map most of the risk factor questions to observations or conditions: e.g. https://hl7.org/fhir/us/core/2017Jan/ValueSet-us-core-observation-ccdasmokingstatus.html we can borrow the codes from this profile.

Let's not use SDC extraction for RiskAssessment, let's do that as a step in the business logic following the extraction.

jingtang10 commented 2 years ago

@jingtang10

SDC library ResourceMapper was not updating multiple answers of the given question item to the resource field. Though, response had captured multiple answers, it was only showing the list of first answers in the resource field. => Support is added, it was required to update all selected answers of "symptoms " and "Medical history" in resource.

https://github.com/google/android-fhir/compare/sp/multiple-resources-extraction?expand=1#diff-4d2985aba5e8203b97cc5dc2eac7dbbd0c7832be34a27036d1ecfb8e4a3a3e50L167

can you create an issue for this please?

jingtang10 commented 2 years ago

Screener encounter questionnaire json need to be updated for below question items for definition base extraction

  1. Covid vaccination
  2. Temperature
  3. Pulse Oximetry

Jing had provided some inputs on it, like adding hidden question, and code item to the questionnaire. Referring documentation for more information on it.

For temperature and pulse oximetry, we will need to extract Observations with a Quantity value. A Quantity value is basically a number and a unit. So if we want the user to choose a unit (in the case of fahrenheit or celsium) we need to present another question, if we don't want the user to choose a unit, then we probably need a hidden field. Example:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }

More info: https://hl7.org/fhir/R4/bodytemp.html

fredhersch commented 2 years ago

Screener encounter questionnaire json need to be updated for below question items for definition base extraction

  1. Covid vaccination
  2. Temperature
  3. Pulse Oximetry

Jing had provided some inputs on it, like adding hidden question, and code item to the questionnaire. Referring documentation for more information on it.

For temperature and pulse oximetry, we will need to extract Observations with a Quantity value. A Quantity value is basically a number and a unit. So if we want the user to choose a unit (in the case of fahrenheit or celsium) we need to present another question, if we don't want the user to choose a unit, then we probably need a hidden field. Example:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }

More info: https://hl7.org/fhir/R4/bodytemp.html

Can we add the relevant LOINC code to the code section like this:

"code": [
            {
              "code": "44169009",
              "display": "Loss of sense of smell (finding)",
              "system": "http://snomed.info/sct"
            }
         ],

So it would look like this - see the addition of code under the linkId item:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "code" : [
             {
                 "code" : "8310-5",
                 "display" : "Temperature",
                 "system" : "http://loinc.org"
             },
          ],
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }
fredhersch commented 2 years ago

@santosh-pingle For the initial pass, let's leave out the vaccination status. We should revisit this next.

For Temperature, the code section can be:

 "code" : [
             {
                 "code" : "8310-5",
                 "display" : "Temperature",
                 "system" : "http://loinc.org"
             },
          ],

For Pulse Oximetry it can be:

 "code" : [
             {
                 "code" : "59408-5",
                 "display" : "Oxygen Saturation",
                 "system" : "http://loinc.org"
             },
          ],

And for heart rate (pulse)

 "code" : [
             {
                 "code" : "8867-4",
                 "display" : "Heart rate",
                "system" : "http://loinc.org"
             }
          ]
santosh-pingle commented 2 years ago

@jingtang10 We also need to discuss multiple resources mapping just before saving them into the application database. These multiple resources are extracted from resource mapper and returned as bundle. e.g Encounter, Observation resources, Condition.

Great question. There're two approaches to link extracted resources with existing resources

  1. Use hidden questions and pre-population of questionnaire to set the references (in our case patient ID) as answers to the hidden questions so that they will be extracted to the subject field of Observation etc.
  2. Handle these after extraction. This requries the application to know when resource types will be in the bundle and handle them accordingly to populate certain fields (i.e. subject of Observation)

The first approach is more generic and probably more elegant but I'm happy for us to do 2 first and follow up with another change to implement the first one.

Implemented 2 approach. I will create separate ticket to follow up 1 approach.

santosh-pingle commented 2 years ago

Screener encounter questionnaire json need to be updated for below question items for definition base extraction

  1. Covid vaccination
  2. Temperature
  3. Pulse Oximetry

Jing had provided some inputs on it, like adding hidden question, and code item to the questionnaire. Referring documentation for more information on it.

For temperature and pulse oximetry, we will need to extract Observations with a Quantity value. A Quantity value is basically a number and a unit. So if we want the user to choose a unit (in the case of fahrenheit or celsium) we need to present another question, if we don't want the user to choose a unit, then we probably need a hidden field. Example:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }

More info: https://hl7.org/fhir/R4/bodytemp.html

Can we add the relevant LOINC code to the code section like this:

"code": [
            {
              "code": "44169009",
              "display": "Loss of sense of smell (finding)",
              "system": "http://snomed.info/sct"
            }
         ],

So it would look like this - see the addition of code under the linkId item:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "code" : [
             {
                 "code" : "8310-5",
                 "display" : "Temperature",
                 "system" : "http://loinc.org"
             },
          ],
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }

I will add definition url and code as suggested, and update you if more information is required.

santosh-pingle commented 2 years ago

@jingtang10

SDC library ResourceMapper was not updating multiple answers of the given question item to the resource field. Though, response had captured multiple answers, it was only showing the list of first answers in the resource field. => Support is added, it was required to update all selected answers of "symptoms " and "Medical history" in resource.

https://github.com/google/android-fhir/compare/sp/multiple-resources-extraction?expand=1#diff-4d2985aba5e8203b97cc5dc2eac7dbbd0c7832be34a27036d1ecfb8e4a3a3e50L167

669 issue created just for reference.

santosh-pingle commented 2 years ago

Screener encounter questionnaire json need to be updated for below question items for definition base extraction

  1. Covid vaccination
  2. Temperature
  3. Pulse Oximetry

Jing had provided some inputs on it, like adding hidden question, and code item to the questionnaire. Referring documentation for more information on it.

For temperature and pulse oximetry, we will need to extract Observations with a Quantity value. A Quantity value is basically a number and a unit. So if we want the user to choose a unit (in the case of fahrenheit or celsium) we need to present another question, if we don't want the user to choose a unit, then we probably need a hidden field. Example:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }

More info: https://hl7.org/fhir/R4/bodytemp.html

Can we add the relevant LOINC code to the code section like this:

"code": [
            {
              "code": "44169009",
              "display": "Loss of sense of smell (finding)",
              "system": "http://snomed.info/sct"
            }
         ],

So it would look like this - see the addition of code under the linkId item:

        {
          "text": "Record temperature",
          "type": "decimal",
          "linkId": "5.1.0",
          "code" : [
             {
                 "code" : "8310-5",
                 "display" : "Temperature",
                 "system" : "http://loinc.org"
             },
          ],
          "definition": "https://..../Observation.valueQuantity.value"
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/minValue",
              "valueDecimal": 35.0
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
              "valueDecimal": 45.0
            }
          ]
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.system"
          "initial": "http://unitsofmeasure.org"
          "hidden": true... 
        },
        {
          "type": "drop-down",
          "linkId": "5.1.0",
          "definition": "https://..../Observation.valueQuantity.code"
          "answerOptions": [
              "F",
              "C"
          ]
        }

I will add definition url and code as suggested, and update you if more information is required.

@jingtang10

Temperature questionnaire item : With the modification below, it requires a Quantity object per item. But observation resources can reference only a single Quantity instance unlike category. It looks like limitation with this modification.

{
      "text": "Temperature",
      "type": "group",
      "linkId": "5.0.0",
      "code": [
        {
          "code": "8310-5",
          "display": "Temperature",
          "system": "http://loinc.org"
        }
      ],
      "definition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "extension": [
        {
          "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
          "valueExpression": {
            "language": "application/x-fhir-query",
            "expression": "Observation",
            "name": "temperature"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "page",
                "display": "Page"
              }
            ],
            "text": "Page"
          }
        }
      ],
      "item": [
        {
          "text": "Add instructions for capturing temperature",
          "type": "display",
          "linkId": "5.0.1"
        },
        {
          "linkId": "5.1.0",
          "text": "Record temperature",
          "type": "quantity",
          "definition": "http://hl7.org/fhir/StructureDefinition/datatypes#Observation.value"
        },
        {
          "text": "Unit",
          "type": "choice",
          "linkId": "5.2.0",
          "required": true,
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.value",
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "drop-down",
                    "display": "Drop down"
                  }
                ],
                "text": "Drop down"
              }
            }
          ],
          "answerOption": [
            {
              "valueCoding": {
                "code": "F",
                "display": "F"
              }
            },
            {
              "valueCoding": {
                "code": "C",
                "display": "C"
              }
            }
          ]
        }
      ]
    },

So I am thinking to just capture quantity as temperature value.

santosh-pingle commented 2 years ago

@jingtang10

Currently, answers does not get updated to the valueQuantity in Observation resource. valueQuantity is declared as abstract type in Observation. Resource mapper fail to use value (QuantityValue) and its nested field to update the answer.

674

santosh-pingle commented 2 years ago

@ekigamba

It does not set the answer to the definition field if the field type is abstract type.

674

santosh-pingle commented 2 years ago

Working on #674, trying to come up with generic fix for Type in hapi model

santosh-pingle commented 2 years ago

674 (SDC library, it does not set the answer to the definition field if the field type is choice type), I will try to create PR by eod today.

Which will unblock us to add implementation for resource extraction of temperature, pulse oximetry and pulse heart rate.

santosh-pingle commented 2 years ago

676 (Update answers to the choice of data type field.) PR is created.

It will update the answers to the choice of data types fields of extracted resources of temperature, pulse oximetry and pulse heart rate.

santosh-pingle commented 2 years ago

@fredhersch Updated screener questionnaire items with definition.

677

santosh-pingle commented 2 years ago

Checking whether existing vaccination questionnaire item response answers get updated to resource fields or not.

fredhersch commented 2 years ago

@santosh-pingle let's leave this for now. Want to get the observations for risk factors, symptoms and vital signs working first.

santosh-pingle commented 2 years ago

@fredhersch Extracted resources are seen in local db as like below.

Heart Rate
{"resourceType":"Observation","id":"4cff9613-c5b1-4ea3-b323-c20a05802c5f","subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":72.0}}

Pulse Rate
{"resourceType":"Observation","id":"ca74b044-8f81-4c49-9360-995b2c0901e9","subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":92.0}}

Temperature
{"resourceType":"Observation","id":"a8cd80e4-514d-4562-841e-f9180c6d5c4d","subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":36.0,"code":"C"}}

Medical History
{"resourceType":"Condition","id":"fb69a03b-4a14-45a3-bfaa-9eee30def876","category":[{"coding":[{"system":"http://snomed.info/sct","code":"161527007","display":"Asthma"}],"text":"Asthma"},{"coding":[{"system":"http://snomed.info/sct","code":"13645005","display":"Chronic Lung Disease"}],"text":"Chronic Lung Disease"},{"coding":[{"system":"http://snomed.info/sct","code":"35489007","display":"Depression"}],"text":"Depression"},{"coding":[{"system":"http://snomed.info/sct","code":"161445009","display":"Diabetes"}],"text":"Diabetes"},{"coding":[{"system":"http://snomed.info/sct","code":"161501007","display":"Hypertension"}],"text":"Hypertension"},{"coding":[{"system":"http://snomed.info/sct","code":"56265001","display":"Heart disease"}],"text":"Heart disease"},{"coding":[{"system":"http://snomed.info/sct","code":"161450003","display":"High blood lipids"}],"text":"High blood lipids"}],"subject":{"reference":"Patient/2126234"}}

Symptoms
{"resourceType":"Observation","id":"c584d404-6321-4f33-abcd-dd276112b083","category":[{"coding":[{"system":"http://snomed.info/sct","code":"386661006","display":"Fever"}],"text":"Fever"},{"coding":[{"system":"http://snomed.info/sct","code":"13645005","display":"Shortness of breath"}],"text":"Shortness of breath"},{"coding":[{"system":"http://snomed.info/sct","code":"49727002","display":"Cough"}],"text":"Cough"},{"coding":[{"system":"http://snomed.info/sct","code":"44169009","display":"Loss of smell"}],"text":"Loss of smell"}],"subject":{"reference":"Patient/2126234"}}
santosh-pingle commented 2 years ago

Modifying vitalSigns questionnaire item to add code in questionnaire item.

santosh-pingle commented 2 years ago

@fredhersch @aditya-07

It seems code structure can not be used as it is in questionnaire item e.g

            {
              "code": "8310-5",
              "display": "Temperature",
              "system": "http://loinc.org"
            }
          ]  

Looks like It requires to restructure code in questionnaire item as group of item so that it can be captured in response as answers. If yes, any suggestion how will it be added it to questionnaire?

Can you please confirm?

santosh-pingle commented 2 years ago

@fredhersch @aditya-07

It seems code structure can not be used as it is in questionnaire item e.g

            {
              "code": "8310-5",
              "display": "Temperature",
              "system": "http://loinc.org"
            }
          ]  

Looks like It requires to restructure code in questionnaire item as group of item so that it can be captured in response as answers. If yes, any suggestion how will it be added it to questionnaire?

Can you please confirm?

These items need be hidden in questionnaire, as it will have initial value as an answer.

santosh-pingle commented 2 years ago

@fredhersch

Updated Temperature Questionnaire item to update the code for temperature vitalSigns. Pulse Heart rate and oximetry items will also be updated for code.

Please confirm once.

{
      "text": "Temperature",
      "type": "group",
      "linkId": "5.0.0",
      "definition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "extension": [
        {
          "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
          "valueExpression": {
            "language": "application/x-fhir-query",
            "expression": "Observation",
            "name": "temperature"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "page",
                "display": "Page"
              }
            ],
            "text": "Page"
          }
        }
      ],
      "item": [
        {
          "text": "Add instructions for capturing temperature",
          "type": "display",
          "linkId": "5.1.0"
        },
        {
          "linkId": "5.2.0",
          "type": "group",
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity",
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
              "valueExpression": {
                "language": "application/x-fhir-query",
                "expression": "Quantity",
                "name": "quantity"
              }
            }
          ],
          "item": [
            {
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.value",
              "text": "Record temperature",
              "type": "decimal",
              "linkId": "5.2.1",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/minValue",
                  "valueDecimal": 35.0
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                  "valueDecimal": 45.0
                }
              ]
            },
            {
              "text": "Unit",
              "type": "choice",
              "linkId": "5.2.2",
              "required": true,
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.code",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                  "valueCodeableConcept": {
                    "coding": [
                      {
                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                        "code": "drop-down",
                        "display": "Drop down"
                      }
                    ],
                    "text": "Drop down"
                  }
                }
              ],
              "answerOption": [
                {
                  "valueCoding": {
                    "code": "F",
                    "display": "F"
                  }
                },
                {
                  "valueCoding": {
                    "code": "C",
                    "display": "C"
                  }
                }
              ]
            }
          ]
        },
        {
          "linkId": "5.3.0",
          "type": "group",
          "enableWhen": [
            {
              "question": "5.1.0",
              "operator": "=",
              "answerBoolean": "true"
            }
          ],
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code",
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
              "valueExpression": {
                "language": "application/x-fhir-query",
                "expression": "CodeableConcept",
                "name": "code"
              }
            }
          ],
          "item": [
            {
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding",
              "type": "group",
              "linkId": "5.3.1",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
                  "valueExpression": {
                    "language": "application/x-fhir-query",
                    "expression": "Coding",
                    "name": "coding"
                  }
                }
              ],
              "item": [
                {
                  "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.code",
                  "type": "string",
                  "linkId": "5.3.1.1",
                  "initial": [
                    {
                      "valueString": "8310-5"
                    }
                  ]
                },
                {
                  "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.system",
                  "type": "string",
                  "linkId": "5.3.1.2",
                  "initial": [
                    {
                      "valueString": "http://loinc.org"
                    }
                  ]
                },
                {
                  "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.display",
                  "type": "string",
                  "linkId": "5.3.1.3",
                  "initial": [
                    {
                      "valueString": "Temperature"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
santosh-pingle commented 2 years ago

@fredhersch

Updated Temperature Questionnaire item to update the code for temperature vitalSigns. Pulse Heart rate and oximetry items will also be updated for code.

Please confirm once.

{
      "text": "Temperature",
      "type": "group",
      "linkId": "5.0.0",
      "definition": "http://hl7.org/fhir/StructureDefinition/Observation",
      "extension": [
        {
          "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
          "valueExpression": {
            "language": "application/x-fhir-query",
            "expression": "Observation",
            "name": "temperature"
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "page",
                "display": "Page"
              }
            ],
            "text": "Page"
          }
        }
      ],
      "item": [
        {
          "text": "Add instructions for capturing temperature",
          "type": "display",
          "linkId": "5.1.0"
        },
        {
          "linkId": "5.2.0",
          "type": "group",
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity",
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
              "valueExpression": {
                "language": "application/x-fhir-query",
                "expression": "Quantity",
                "name": "quantity"
              }
            }
          ],
          "item": [
            {
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.value",
              "text": "Record temperature",
              "type": "decimal",
              "linkId": "5.2.1",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/minValue",
                  "valueDecimal": 35.0
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                  "valueDecimal": 45.0
                }
              ]
            },
            {
              "text": "Unit",
              "type": "choice",
              "linkId": "5.2.2",
              "required": true,
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.code",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                  "valueCodeableConcept": {
                    "coding": [
                      {
                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                        "code": "drop-down",
                        "display": "Drop down"
                      }
                    ],
                    "text": "Drop down"
                  }
                }
              ],
              "answerOption": [
                {
                  "valueCoding": {
                    "code": "F",
                    "display": "F"
                  }
                },
                {
                  "valueCoding": {
                    "code": "C",
                    "display": "C"
                  }
                }
              ]
            }
          ]
        },
        {
          "linkId": "5.3.0",
          "type": "group",
          "enableWhen": [
            {
              "question": "5.1.0",
              "operator": "=",
              "answerBoolean": "true"
            }
          ],
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code",
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
              "valueExpression": {
                "language": "application/x-fhir-query",
                "expression": "CodeableConcept",
                "name": "code"
              }
            }
          ],
          "item": [
            {
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding",
              "type": "group",
              "linkId": "5.3.1",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
                  "valueExpression": {
                    "language": "application/x-fhir-query",
                    "expression": "Coding",
                    "name": "coding"
                  }
                }
              ],
              "item": [
                {
                  "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.code",
                  "type": "string",
                  "linkId": "5.3.1.1",
                  "initial": [
                    {
                      "valueString": "8310-5"
                    }
                  ]
                },
                {
                  "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.system",
                  "type": "string",
                  "linkId": "5.3.1.2",
                  "initial": [
                    {
                      "valueString": "http://loinc.org"
                    }
                  ]
                },
                {
                  "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.code.coding.display",
                  "type": "string",
                  "linkId": "5.3.1.3",
                  "initial": [
                    {
                      "valueString": "Temperature"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },

With this change code is seen as below for temperature.

{"resourceType":"Observation","id":"15e1944b-d2e1-4feb-b0c0-f521b026c098","code":{"coding":[{"system":"http://loinc.org","code":"8310-5","display":"Temperature"}]},"subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":36.0,"code":"C"}}
fredhersch commented 2 years ago

Thanks @santosh-pingle the output looks right to me. I do wonder whether we can work on the Questionnaire component so as not have to split up all of the different items. Let me think about this further

fredhersch commented 2 years ago

@santosh-pingle For observations there are two scenarios:

  1. For vital-signs: we use observation.code from the item and then set the observation.value using the valueQuantity (type Quantity) with hidden fields for the units coding system. This has been well documented by @jingtang10 in the thread above

I would recommend that we add an observation.category of 'vital-signs' - to all observations that represent vital-signs. We can aim to address this at a later stage. Could we just add this to the Questionnaire json for the relevant group of items?

NOTE: This is the same pattern we would follow for laboratory type data that would be stored as Observation but with the observation.category of laboratory

  1. For other observations e.g. symptoms, risk-factors the specification offers 4 approaches - see here
The Observation.code is also expressed in a way that does not specify the observation action but indicates a statement about findings reduced to a single name (or term), as in the above item. In this example, the Observation.value is present and "qualifies" the finding typically confirming or refuting it. For example:
code=[Abdominal tenderness]
value=[found/true]

There are three scenarios:

A) When there can be multiple choices each leading to the generation of an individual resource - for example, we use the repeats:true for a drop-down itemControl to generate a list of checkboxes with the question: Do you have any of the following symptoms

"item": [
        {
          "text": "In the past two weeks have you experienced ANY of these symptoms?",
          "type": "choice",
          "linkId": "1.1.0",
          "required": true,
          "repeats": true,
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "drop-down",
                    "display": "Drop down"
                  }
                ],
                "text": "Drop down"
              }
            }
          ],
          "answerOption": [
            {
              "valueCoding": {
                "code": "386661006",
                "display": "Fever",
                "system": "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "13645005",
                "display": "Shortness of breath",
                "system": "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "49727002",
                "display": "Cough",
                "system": "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "44169009",
                "display": "Loss of smell",
                "system": "http://snomed.info/sct"
              }
            }
          ]
        }
      ]
    },

Selected Fever and Cough would generate TWO Observation resources with:

For non-selected options, we would NOT extract resources

An example observation would look like:

{
"resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "code": "exam",
          "display": "symptoms",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "386661006",
        "display": "Fever (finding)",
        "system": "http://loinc.org"
      }
    ],
    "text": "Fever (finding)"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueBoolean": {
   "value" : "true"
  }
}

And for the Cough observation:

{
"resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "code": "exam",
          "display": "symptoms",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "49727002",
        "display": "Cough",
        "system": "http://loinc.org"
      }
    ],
    "text": "Cough"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueBoolean": {
   "value" : "true"
  }
}

B) When each question is a boolean response e.g. "Do you have fever"? Yes / No / Don't know | "Do you have cough" "Yes / No / Don't know"

    {
      "type": "group",
      "required": true,
      "linkId": "S",
      "text": "Symptoms",
      "item": [
        {
          "type": "choice",
          "required": true,
          "linkId": "S0",
          "code": [
            {
              "code": "386661006",
              "display": "Fever (finding)",
              "system": "http://snomed.info/sct"
            }
          ],
          "text": "Have you had a fever (over 38°C) in the past 24 hours?",
          "answerValueSet": "http://fhir.data4life.care/covid-19/r4/ValueSet/yesno"
        },

In this scenario the relevant observation.code comes from the item.code section and the observation.value is the boolean. The resulting observation would look like:

Selecting Yes would generate a single Observation resource with:

For non-selected options, we would NOT extract resources

{
"resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",

  "category": [
    {
      "coding": [
        {
          "code": "exam",
          "display": "symptoms",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "386661006",
        "display": "Fever (finding)",
        "system": "http://loinc.org"
      }
    ],
    "text": "Fever (finding)"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueBoolean": {
   "value" : "true"
  }
}

C) For handling riskfactors like smoking status the preferred approach would be a hybrid:


"item": [
        {
          "text": "Do you smoke cigarettes?",
          "type": "choice",
          "linkId": "2.1.0",
          "required": true,
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "drop-down",
                    "display": "Drop down"
                  }
                ],
                "text": "Drop down"
              }
            }
          ],
          "code": [
            {
              "code": "72166-2",
              "display": "Tobacco smoking status NHIS",
              "system": "http://loinc.org"
            }
          ],
          "answerOption": [
            {
              "valueCoding": {
                "code": "77176002",
                "display": "Current smoker",
                "system" : "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "8517006",
                "display": "Ex-smoker",
                "system" : "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "8392000",
                "display": "Non-smoker",
                "system" : "http://snomed.info/sct"
              }
            }
          ]
        },

Here the resulting Observation which should ideally be observation.category = 'social-history' would look like:


{
 "resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "code": "social-history",
          "display": "social history",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "72166-2",
        "display": "Tobacco smoking status NHIS",
        "system": "http://loinc.org"
      }
    ],
    "text": "Tobacco smoking status NHIS"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueCodeableConcept": {
    "coding": [
      {
        "code": "8392000",
        "display": "Non smoker",
        "system": "http://snomed.info/sct"
      }
    ],
    "text": "Non smoker"
  }
}
fredhersch commented 2 years ago

@santosh-pingle can you review this please. Thanks

santosh-pingle commented 2 years ago

Sure, please give me sometime, I will review it.

fredhersch commented 2 years ago

@santosh-pingle In response to your earlier comment for extracting the Temperature observation, I'm sharing an edited version of the Questionnaire here. I have put the code in the root item and removed the itemId 5.3.0

What I think we should have is a single group with: Item for the code: Observation.code = item.code (codeableConcept values) Item for the valueQuantity:

I don't think the expression is quite right yet ...

{
      "text": "Temperature",
      "type": "group",
      "linkId": "5.0.0",
      "extension": [
        {
          "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
          "valueExpression": {
            "language": "application/x-fhir-query",
            "expression": "Observation",
            "name": "temperature"
          }
        },
      "definition": "http://hl7.org/fhir/StructureDefinition/Observation#observation.code",
      "code" : [
       {
          "code" : "8310-5",
          "display" : "Temperature",
          "system" : "http://loinc.org"
       }
      ],
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "page",
                "display": "Page"
              }
            ],
            "text": "Page"
          }
        }
      ],
      "item": [
        {
          "text": "Add instructions for capturing temperature",
          "type": "display",
          "linkId": "5.1.0"
        },
        {
          "linkId": "5.2.0",
          "type": "group",
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity",
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
              "valueExpression": {
                "language": "application/x-fhir-query",
                "expression": "Quantity",
                "name": "quantity"
              }
            }
          ],
          "item": [
            {
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.value",
              "text": "Record temperature",
              "type": "decimal",
              "linkId": "5.2.1",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/minValue",
                  "valueDecimal": 35.0
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                  "valueDecimal": 45.0
                }
              ]
            },
            {
              "text": "Unit",
              "type": "choice",
              "linkId": "5.2.2",
              "required": true,
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.code",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                  "valueCodeableConcept": {
                    "coding": [
                      {
                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                        "code": "drop-down",
                        "display": "Drop down"
                      }
                    ],
                    "text": "Drop down"
                  }
                }
              ],
              "answerOption": [
                {
                  "valueCoding": {
                    "code": "F",
                    "display": "F"
                  }
                },
                {
                  "valueCoding": {
                    "code": "C",
                    "display": "C"
                  }
                }
              ]
            }
          ]
        },
      ]
    },
santosh-pingle commented 2 years ago

683 sdc library does not support hidden extension.

santosh-pingle commented 2 years ago

@santosh-pingle In response to your earlier comment for extracting the Temperature observation, I'm sharing an edited version of the Questionnaire here. I have put the code in the root item and removed the itemId 5.3.0

What I think we should have is a single group with: Item for the code: Observation.code = item.code (codeableConcept values) Item for the valueQuantity:

  • Observation.valueQuantity.value = value
  • Observation.valueQuantity.code = code
  • Observation.valueQuantity.system = http://unitsofmeasure.org (hidden field)
  • Observation.valueQuantity.unit = F or C (as per earlier thread these could either be hidden or if they are user selected then they need to be an additional item)

I don't think the expression is quite right yet ...

{
      "text": "Temperature",
      "type": "group",
      "linkId": "5.0.0",
      "extension": [
        {
          "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
          "valueExpression": {
            "language": "application/x-fhir-query",
            "expression": "Observation",
            "name": "temperature"
          }
        },
      "definition": "http://hl7.org/fhir/StructureDefinition/Observation#observation.code",
      "code" : [
       {
          "code" : "8310-5",
          "display" : "Temperature",
          "system" : "http://loinc.org"
       }
      ],
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "page",
                "display": "Page"
              }
            ],
            "text": "Page"
          }
        }
      ],
      "item": [
        {
          "text": "Add instructions for capturing temperature",
          "type": "display",
          "linkId": "5.1.0"
        },
        {
          "linkId": "5.2.0",
          "type": "group",
          "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity",
          "extension": [
            {
              "url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemExtractionContext",
              "valueExpression": {
                "language": "application/x-fhir-query",
                "expression": "Quantity",
                "name": "quantity"
              }
            }
          ],
          "item": [
            {
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.value",
              "text": "Record temperature",
              "type": "decimal",
              "linkId": "5.2.1",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/minValue",
                  "valueDecimal": 35.0
                },
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
                  "valueDecimal": 45.0
                }
              ]
            },
            {
              "text": "Unit",
              "type": "choice",
              "linkId": "5.2.2",
              "required": true,
              "definition": "http://hl7.org/fhir/StructureDefinition/Observation#Observation.valueQuantity.code",
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
                  "valueCodeableConcept": {
                    "coding": [
                      {
                        "system": "http://hl7.org/fhir/questionnaire-item-control",
                        "code": "drop-down",
                        "display": "Drop down"
                      }
                    ],
                    "text": "Drop down"
                  }
                }
              ],
              "answerOption": [
                {
                  "valueCoding": {
                    "code": "F",
                    "display": "F"
                  }
                },
                {
                  "valueCoding": {
                    "code": "C",
                    "display": "C"
                  }
                }
              ]
            }
          ]
        },
      ]
    },

Not sure, whether we can add code and definition to the extension and then extract it with definition based approach. Does extension have definition element?

santosh-pingle commented 2 years ago

VitalSigns saved in local db as below.

{"resourceType":"Observation","id":"633cfdc9-061e-4462-97d3-6f13fa967e6d","code":{"coding":[{"system":"http://loinc.org","code":"8310-5","display":"Temperature"}]},"subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":36.0,"system":"http://unitsofmeasure.org","code":"C"}}

{"resourceType":"Observation","id":"42d0314e-1948-454e-9ef8-5a08041a8d17","code":{"coding":[{"system":"http://loinc.org","code":"8867-4","display":"Heart rate"}]},"subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":76.0,"system":"http://unitsofmeasure.org","code":"/min"}}

{"resourceType":"Observation","id":"5e44c47a-2b52-4b56-8abc-9937eac7ee62","code":{"coding":[{"system":"http://loinc.org","code":"59408-5","display":"Oxygen Saturation"}]},"subject":{"reference":"Patient/2126234"},"valueQuantity":{"value":99.0,"system":"http://unitsofmeasure.org","code":"%"}}
santosh-pingle commented 2 years ago

@santosh-pingle For observations there are two scenarios:

  1. For vital-signs: we use observation.code from the item and then set the observation.value using the valueQuantity (type Quantity) with hidden fields for the units coding system. This has been well documented by @jingtang10 in the thread above

I would recommend that we add an observation.category of 'vital-signs' - to all observations that represent vital-signs. We can aim to address this at a later stage. Could we just add this to the Questionnaire json for the relevant group of items?

NOTE: This is the same pattern we would follow for laboratory type data that would be stored as Observation but with the observation.category of laboratory

  1. For other observations e.g. symptoms, risk-factors the specification offers 4 approaches - see here
  • For our base implementation we are proposing to support 'option 3'
The Observation.code is also expressed in a way that does not specify the observation action but indicates a statement about findings reduced to a single name (or term), as in the above item. In this example, the Observation.value is present and "qualifies" the finding typically confirming or refuting it. For example:
code=[Abdominal tenderness]
value=[found/true]

There are three scenarios:

A) When there can be multiple choices each leading to the generation of an individual resource - for example, we use the repeats:true for a drop-down itemControl to generate a list of checkboxes with the question: Do you have any of the following symptoms

"item": [
        {
          "text": "In the past two weeks have you experienced ANY of these symptoms?",
          "type": "choice",
          "linkId": "1.1.0",
          "required": true,
          "repeats": true,
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "drop-down",
                    "display": "Drop down"
                  }
                ],
                "text": "Drop down"
              }
            }
          ],
          "answerOption": [
            {
              "valueCoding": {
                "code": "386661006",
                "display": "Fever",
                "system": "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "13645005",
                "display": "Shortness of breath",
                "system": "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "49727002",
                "display": "Cough",
                "system": "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "44169009",
                "display": "Loss of smell",
                "system": "http://snomed.info/sct"
              }
            }
          ]
        }
      ]
    },

Selected Fever and Cough would generate TWO Observation resources with:

  • Observation.code is a Codeable Concept with values from the valueCoding result
  • Observation.value is a boolean of true

For non-selected options, we would NOT extract resources

An example observation would look like:

{
"resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "code": "exam",
          "display": "symptoms",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "386661006",
        "display": "Fever (finding)",
        "system": "http://loinc.org"
      }
    ],
    "text": "Fever (finding)"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueBoolean": {
   "value" : "true"
  }
}

And for the Cough observation:

{
"resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "code": "exam",
          "display": "symptoms",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "49727002",
        "display": "Cough",
        "system": "http://loinc.org"
      }
    ],
    "text": "Cough"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueBoolean": {
   "value" : "true"
  }
}

B) When each question is a boolean response e.g. "Do you have fever"? Yes / No / Don't know | "Do you have cough" "Yes / No / Don't know"

    {
      "type": "group",
      "required": true,
      "linkId": "S",
      "text": "Symptoms",
      "item": [
        {
          "type": "choice",
          "required": true,
          "linkId": "S0",
          "code": [
            {
              "code": "386661006",
              "display": "Fever (finding)",
              "system": "http://snomed.info/sct"
            }
          ],
          "text": "Have you had a fever (over 38°C) in the past 24 hours?",
          "answerValueSet": "http://fhir.data4life.care/covid-19/r4/ValueSet/yesno"
        },

In this scenario the relevant observation.code comes from the item.code section and the observation.value is the boolean. The resulting observation would look like:

Selecting Yes would generate a single Observation resource with:

  • Observation.code is a Codeable Concept with values from the code section
  • Observation.category = 'exam' (ideally)
  • Observation.value is a boolean of true - TBC

For non-selected options, we would NOT extract resources

{
"resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",

  "category": [
    {
      "coding": [
        {
          "code": "exam",
          "display": "symptoms",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "386661006",
        "display": "Fever (finding)",
        "system": "http://loinc.org"
      }
    ],
    "text": "Fever (finding)"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueBoolean": {
   "value" : "true"
  }
}

C) For handling riskfactors like smoking status the preferred approach would be a hybrid:


"item": [
        {
          "text": "Do you smoke cigarettes?",
          "type": "choice",
          "linkId": "2.1.0",
          "required": true,
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-item-control",
                    "code": "drop-down",
                    "display": "Drop down"
                  }
                ],
                "text": "Drop down"
              }
            }
          ],
          "code": [
            {
              "code": "72166-2",
              "display": "Tobacco smoking status NHIS",
              "system": "http://loinc.org"
            }
          ],
          "answerOption": [
            {
              "valueCoding": {
                "code": "77176002",
                "display": "Current smoker",
                "system" : "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "8517006",
                "display": "Ex-smoker",
                "system" : "http://snomed.info/sct"
              }
            },
            {
              "valueCoding": {
                "code": "8392000",
                "display": "Non-smoker",
                "system" : "http://snomed.info/sct"
              }
            }
          ]
        },

Here the resulting Observation which should ideally be observation.category = 'social-history' would look like:


{
 "resourceType": "Observation",
 "id": "78354025-1059-4f0f-8b04-8478d696d234",
  "issued": "1990-03-12T09:04:10.192-05:00",
  "meta": {
    "lastUpdated": "2021-04-01T12:45:31.338652+00:00",
    "versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "code": "social-history",
          "display": "social history",
          "system": "http://terminology.hl7.org/CodeSystem/observation-category"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "code": "72166-2",
        "display": "Tobacco smoking status NHIS",
        "system": "http://loinc.org"
      }
    ],
    "text": "Tobacco smoking status NHIS"
  },
  "effectiveDateTime": "1990-03-12T09:04:10-05:00",
  "encounter": {
    "reference": "Encounter/<encounter_id>"
  },
  "subject": {
    "reference": "Patient/<patient_id>"
  },
  "valueCodeableConcept": {
    "coding": [
      {
        "code": "8392000",
        "display": "Non smoker",
        "system": "http://snomed.info/sct"
      }
    ],
    "text": "Non smoker"
  }
}

Thanks!

Reviewing it.

@fredhersch Do you want me to restructure questionnaire json to support definition based extraction for above questionnaire items ? or will it be shared with me? Thanks!

fredhersch commented 2 years ago

If you can propose the correct way that would be great. Thanks

On Thu, 5 Aug 2021, 1:03 pm santosh-pingle, @.***> wrote:

@santosh-pingle https://github.com/santosh-pingle For observations there are two scenarios:

  1. For vital-signs: we use observation.code from the item and then set the observation.value using the valueQuantity (type Quantity) with hidden fields for the units coding system. This has been well documented by @jingtang10 https://github.com/jingtang10 in the thread above

I would recommend that we add an observation.category of 'vital-signs' - to all observations that represent vital-signs. We can aim to address this at a later stage. Could we just add this to the Questionnaire json for the relevant group of items?

NOTE: This is the same pattern we would follow for laboratory type data that would be stored as Observation but with the observation.category of laboratory

  1. For other observations e.g. symptoms, risk-factors the specification offers 4 approaches - see here https://www.hl7.org/fhir/observation.html#code-interopl

    • For our base implementation we are proposing to support 'option 3'

The Observation.code is also expressed in a way that does not specify the observation action but indicates a statement about findings reduced to a single name (or term), as in the above item. In this example, the Observation.value is present and "qualifies" the finding typically confirming or refuting it. For example:

code=[Abdominal tenderness]

value=[found/true]

There are three scenarios:

A) When there can be multiple choices each leading to the generation of an individual resource - for example, we use the repeats:true for a drop-down itemControl to generate a list of checkboxes with the question: Do you have any of the following symptoms

"item": [

    {

      "text": "In the past two weeks have you experienced ANY of these symptoms?",

      "type": "choice",

      "linkId": "1.1.0",

      "required": true,

      "repeats": true,

      "extension": [

        {

          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",

          "valueCodeableConcept": {

            "coding": [

              {

                "system": "http://hl7.org/fhir/questionnaire-item-control",

                "code": "drop-down",

                "display": "Drop down"

              }

            ],

            "text": "Drop down"

          }

        }

      ],

      "answerOption": [

        {

          "valueCoding": {

            "code": "386661006",

            "display": "Fever",

            "system": "http://snomed.info/sct"

          }

        },

        {

          "valueCoding": {

            "code": "13645005",

            "display": "Shortness of breath",

            "system": "http://snomed.info/sct"

          }

        },

        {

          "valueCoding": {

            "code": "49727002",

            "display": "Cough",

            "system": "http://snomed.info/sct"

          }

        },

        {

          "valueCoding": {

            "code": "44169009",

            "display": "Loss of smell",

            "system": "http://snomed.info/sct"

          }

        }

      ]

    }

  ]

},

Selected Fever and Cough would generate TWO Observation resources with:

  • Observation.code is a Codeable Concept with values from the valueCoding result
  • Observation.value is a boolean of true

For non-selected options, we would NOT extract resources

An example observation would look like:

{

"resourceType": "Observation",

"id": "78354025-1059-4f0f-8b04-8478d696d234",

"issued": "1990-03-12T09:04:10.192-05:00",

"meta": {

"lastUpdated": "2021-04-01T12:45:31.338652+00:00",

"versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"

},

"status": "final",

"category": [

{

  "coding": [

    {

      "code": "exam",

      "display": "symptoms",

      "system": "http://terminology.hl7.org/CodeSystem/observation-category"

    }

  ]

}

],

"code": {

"coding": [

  {

    "code": "386661006",

    "display": "Fever (finding)",

    "system": "http://loinc.org"

  }

],

"text": "Fever (finding)"

},

"effectiveDateTime": "1990-03-12T09:04:10-05:00",

"encounter": {

"reference": "Encounter/<encounter_id>"

},

"subject": {

"reference": "Patient/<patient_id>"

},

"valueBoolean": {

"value" : "true"

}

}

And for the Cough observation:

{

"resourceType": "Observation",

"id": "78354025-1059-4f0f-8b04-8478d696d234",

"issued": "1990-03-12T09:04:10.192-05:00",

"meta": {

"lastUpdated": "2021-04-01T12:45:31.338652+00:00",

"versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"

},

"status": "final",

"category": [

{

  "coding": [

    {

      "code": "exam",

      "display": "symptoms",

      "system": "http://terminology.hl7.org/CodeSystem/observation-category"

    }

  ]

}

],

"code": {

"coding": [

  {

    "code": "49727002",

    "display": "Cough",

    "system": "http://loinc.org"

  }

],

"text": "Cough"

},

"effectiveDateTime": "1990-03-12T09:04:10-05:00",

"encounter": {

"reference": "Encounter/<encounter_id>"

},

"subject": {

"reference": "Patient/<patient_id>"

},

"valueBoolean": {

"value" : "true"

}

}

B) When each question is a boolean response e.g. "Do you have fever"? Yes / No / Don't know | "Do you have cough" "Yes / No / Don't know"

{

  "type": "group",

  "required": true,

  "linkId": "S",

  "text": "Symptoms",

  "item": [

    {

      "type": "choice",

      "required": true,

      "linkId": "S0",

      "code": [

        {

          "code": "386661006",

          "display": "Fever (finding)",

          "system": "http://snomed.info/sct"

        }

      ],

      "text": "Have you had a fever (over 38°C) in the past 24 hours?",

      "answerValueSet": "http://fhir.data4life.care/covid-19/r4/ValueSet/yesno"

    },

In this scenario the relevant observation.code comes from the item.code section and the observation.value is the boolean. The resulting observation would look like:

Selecting Yes would generate a single Observation resource with:

  • Observation.code is a Codeable Concept with values from the code section
  • Observation.category = 'exam' (ideally)
  • Observation.value is a boolean of true - TBC

For non-selected options, we would NOT extract resources

{

"resourceType": "Observation",

"id": "78354025-1059-4f0f-8b04-8478d696d234",

"issued": "1990-03-12T09:04:10.192-05:00",

"meta": {

"lastUpdated": "2021-04-01T12:45:31.338652+00:00",

"versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"

},

"status": "final",

"category": [

{

  "coding": [

    {

      "code": "exam",

      "display": "symptoms",

      "system": "http://terminology.hl7.org/CodeSystem/observation-category"

    }

  ]

}

],

"code": {

"coding": [

  {

    "code": "386661006",

    "display": "Fever (finding)",

    "system": "http://loinc.org"

  }

],

"text": "Fever (finding)"

},

"effectiveDateTime": "1990-03-12T09:04:10-05:00",

"encounter": {

"reference": "Encounter/<encounter_id>"

},

"subject": {

"reference": "Patient/<patient_id>"

},

"valueBoolean": {

"value" : "true"

}

}

C) For handling riskfactors like smoking status the preferred approach would be a hybrid:

"item": [

    {

      "text": "Do you smoke cigarettes?",

      "type": "choice",

      "linkId": "2.1.0",

      "required": true,

      "extension": [

        {

          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",

          "valueCodeableConcept": {

            "coding": [

              {

                "system": "http://hl7.org/fhir/questionnaire-item-control",

                "code": "drop-down",

                "display": "Drop down"

              }

            ],

            "text": "Drop down"

          }

        }

      ],

      "code": [

        {

          "code": "72166-2",

          "display": "Tobacco smoking status NHIS",

          "system": "http://loinc.org"

        }

      ],

      "answerOption": [

        {

          "valueCoding": {

            "code": "77176002",

            "display": "Current smoker",

            "system" : "http://snomed.info/sct"

          }

        },

        {

          "valueCoding": {

            "code": "8517006",

            "display": "Ex-smoker",

            "system" : "http://snomed.info/sct"

          }

        },

        {

          "valueCoding": {

            "code": "8392000",

            "display": "Non-smoker",

            "system" : "http://snomed.info/sct"

          }

        }

      ]

    },

Here the resulting Observation which should ideally be observation.category = 'social-history' would look like:

{

"resourceType": "Observation",

"id": "78354025-1059-4f0f-8b04-8478d696d234",

"issued": "1990-03-12T09:04:10.192-05:00",

"meta": {

"lastUpdated": "2021-04-01T12:45:31.338652+00:00",

"versionId": "MTYxNzI4MTEzMTMzODY1MjAwMA"

},

"status": "final",

"category": [

{

  "coding": [

    {

      "code": "social-history",

      "display": "social history",

      "system": "http://terminology.hl7.org/CodeSystem/observation-category"

    }

  ]

}

],

"code": {

"coding": [

  {

    "code": "72166-2",

    "display": "Tobacco smoking status NHIS",

    "system": "http://loinc.org"

  }

],

"text": "Tobacco smoking status NHIS"

},

"effectiveDateTime": "1990-03-12T09:04:10-05:00",

"encounter": {

"reference": "Encounter/<encounter_id>"

},

"subject": {

"reference": "Patient/<patient_id>"

},

"valueCodeableConcept": {

"coding": [

  {

    "code": "8392000",

    "display": "Non smoker",

    "system": "http://snomed.info/sct"

  }

],

"text": "Non smoker"

}

}

Reviewing it.

@fredhersch https://github.com/fredhersch Do you want me to restructure questionnaire json to support definition based extraction for above questionnaire items ? or you are going to share it with me?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/android-fhir/issues/625#issuecomment-893166311, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAIPLKUKF55DDOJLS6ES23T3ILTJANCNFSM47ZFZVVQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

santosh-pingle commented 2 years ago

Working on symptoms to extract each answer as single observation resource.

santosh-pingle commented 2 years ago

Yesterday, @fredhersch and we discussed offline, we can choose option 3 or 4. Updating symptoms questionnaire item json with definition based extraction.

santosh-pingle commented 2 years ago

Below observations were extracted for selected symptoms.

{"resourceType":"Observation","id":"4dd0f662-9a5a-4631-90c5-3ea225ecd78c","code":{"coding":[{"system":"http://snomed.info/sct","code":"386661006","display":"Fever"}],"text":"Fever"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/7f030a5d-8036-48fc-8e09-facbf595ac79"}}

{"resourceType":"Observation","id":"4dc0c628-d48c-4e96-9d29-ab3b6165870f","code":{"coding":[{"system":"http://snomed.info/sct","code":"13645005","display":"Shortness of breath"}],"text":"Shortness of breath"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/7f030a5d-8036-48fc-8e09-facbf595ac79"}}

{"resourceType":"Observation","id":"def92e59-cb77-4c36-b985-59d9c4cfe0e7","code":{"coding":[{"system":"http://snomed.info/sct","code":"49727002","display":"Cough"}],"text":"Cough"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/3df329b6-d81b-4cd2-8854-0ac6e2e19d7c"}}

{"resourceType":"Observation","id":"36b7951c-097e-4405-8f68-fd609840c1cc","code":{"coding":[{"system":"http://snomed.info/sct","code":"44169009","display":"Loss of smell"}],"text":"Loss of smell"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/3df329b6-d81b-4cd2-8854-0ac6e2e19d7c"}}
santosh-pingle commented 2 years ago

Working on medical history (conditions) to extract each answer as single observation resource.

santosh-pingle commented 2 years ago

Extracted medical history resources for selected answers.

{"resourceType":"Condition","id":"01ba55e1-b1e9-4591-a688-b4cf440ab8dd","code":{"coding":[{"system":"http://snomed.info/sct","code":"161450003","display":"High blood lipids"}],"text":"High blood lipids"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}

{"resourceType":"Condition","id":"3482634b-9c12-4e45-85fb-898b5418ee75","code":{"coding":[{"system":"http://snomed.info/sct","code":"56265001","display":"Heart disease"}],"text":"Heart disease"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}

{"resourceType":"Condition","id":"2214ce35-16fd-4ffb-a888-7dde96a8fa20","code":{"coding":[{"system":"http://snomed.info/sct","code":"161501007","display":"Hypertension"}],"text":"Hypertension"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}

{"resourceType":"Condition","id":"796fc950-9162-42b9-bab6-e8943b909556","code":{"coding":[{"system":"http://snomed.info/sct","code":"161445009","display":"Diabetes"}],"text":"Diabetes"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}

{"resourceType":"Condition","id":"3c9834bd-e0be-4d3a-9111-6d74b4e6c447","code":{"coding":[{"system":"http://snomed.info/sct","code":"35489007","display":"Depression"}],"text":"Depression"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}

{"resourceType":"Condition","id":"b7cd02d4-a91d-459c-9b16-cc35b0e534e2","code":{"coding":[{"system":"http://snomed.info/sct","code":"13645005","display":"Chronic Lung Disease"}],"text":"Chronic Lung Disease"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}

{"resourceType":"Condition","id":"cede860d-7f7f-4f4c-bdaa-a649546057ab","code":{"coding":[{"system":"http://snomed.info/sct","code":"161527007","display":"Asthma"}],"text":"Asthma"},"subject":{"reference":"Patient/2126234"},"encounter":{"reference":"Encounter/59b08660-ec85-4026-a4f2-327220a43b71"}}
santosh-pingle commented 2 years ago

Looking into #626