LHNCBC / lforms

See the project website at http://lhncbc.github.io/lforms/, or view the demo website at https://lhcforms.nlm.nih.gov/lhcforms.
Other
99 stars 55 forks source link

How to extract the full panel structure? #142

Open linforestzhang opened 5 months ago

linforestzhang commented 5 months ago

How to extract the full panel structure in the FHIR QR resource using FHIR Observation? For example, a Questionnaire has the following panel structure:

Questionnaire
-Item-Level-1-A (observationExtract = true)
-Item-Level-1-B (observationExtract = true)
--Item-Level-2-B1 (observationExtract = true)
--Item-Level-2-B2 (observationExtract = true)
--Item-Level-2-B3 (observationExtract = true)
...

In the FHIR QuestionnaireResponse, the funtion LForms.Util.getFormFHIRData can extract the user data in the complete panel structure, including the group/header item (Item-Level-1-B). All the FHIR Observations can be extracted but the group/header item (Item-Level-1-B). So how to do the extract the full Observation structure to include the group/header item(s)?

Thanks

plynchnlm commented 5 months ago

We do offer a DiagnosticReport export which preserves the structure, but we have not updated that since DSTU2. (See https://lhcforms.nlm.nih.gov/lhcforms, and after filling some of the "US Surgeon General family health portrait", choose "Show Form Data As..." and pick "FHIR DiagnosticReport".

If that is something you are interested in let us know and we can update the code to at least R4.

Also, just last week https://jira.hl7.org/browse/FHIR-37572 was approved, which adds an option to the permitted values of observation-extract that would allow you to extract all the child questions as Observations linked to the parent via hasMember or component. Since the observation-extract setting is inherited, you would only need to place this on the root of the Questionnaire. However, this new feature of observation-extract is not yet supported in lforms, so let us know if this is the option you would prefer.

linforestzhang commented 5 months ago

Yes, that's the option I want. Thanks for your help! By the way, for some unknown reason, some of the NLM pages (pattern: *.nlm.nih.gov, such as https://lhcforms.nlm.nih.gov/, https://ucum.nlm.nih.gov/ucum-lhc/ ...) have been inaccessible in recent months, including the one you mentioned above, and all of them show the following error: 403 Forbidden.

plynchnlm commented 5 months ago

Just to be clear, of those two options, you want the observtion-extract one?

I am not sure why you would be getting 403 errors on our websites, but it is concerning to hear. Is that a consistent problem? I am can access them even from outside of our NLM network. Are there just certain networks on which you get that issue?