Closed ryuuzake closed 1 month ago
Thanks @ryuuzake. I'll have a look soon.
@fongsean please don't merge this PR yet. I still need to fix some bugs
There's an issue that we're currently checking on. Per FHIR SDC specification, the questionnaire item is extracted only if it contains sdc-questionnaire-observationExtract
extension set as true
. Currently, we extract any item included in the Questionnaire resource, which does not completely comply with FHIR SDC.
Reiterating through the conceptual algorithm in SDC specification:
For testing purpose, I included a questionnaire.json
file. This resource contains a PHQ-2 instrument, which consists of two questions about depression. After implementing this conceptual algorithm, @ryuuzake and I will follow this testing procedure:
questionnaire.json
in Smart Forms PlaygroundCase 1:
sdc-questionnaire-observationExtract
set as true
.Case 2:
sdc-questionnaire-observationExtract
as false
for the second question.Case 3:
sdc-questionnaire-observationExtract
extension from the first item.Questionnaire resource: questionnaire.json
Hi @fongsean thanks for the wait. I already fix the bugs and confirm with @lamurian
Hi both, thanks for validating with the SDC spec and putting in work to address the issues.
Code looks amazing - happy that @ryuuzake is using the generic recursive function for traversal. There are many use cases in the codebase which I previously written that can adopt it.
I've added two comments. I'll resolve my part and push it to your branch again. Other parts looks great. Once we resolve these two things, I will publish v0.40.0 and merge it into main.
Thanks!
Hi @fongsean, I already integrate your changes to my PR
Closes #976
Sorry for no update for a long time. I made the code to recursively extract all the results into
Observation
. I think the code needs many refactor to match the project structure. I would change it based on your review @fongsean