-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to generate test/dummy questionnaire responses #15
Comments
Leaving this open because I'm still looking into using Questionnaire/$populate as an alternative option |
The To get more detail of how this actually works, checkout the Form Population page which talks about the 3 distinct operations under the populate umbrella, the population modes, how to design Questionnaires to support the operation etc |
In order to test this out,
2023-11-02 10:30:36.779 [main] INFO ca.uhn.fhir.cr.config.ProviderLoader [ProviderLoader.java:53] loading provider: class ca.uhn.fhir.cr.r4.measure.MeasureOperationsProvider
2023-11-02 10:30:36.780 [main] INFO c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:1776] Added 1 plain provider(s). Total 8
2023-11-02 10:30:36.780 [main] INFO ca.uhn.fhir.cr.config.ProviderLoader [ProviderLoader.java:53] loading provider: class ca.uhn.fhir.cr.r4.measure.SubmitDataProvider
2023-11-02 10:30:36.780 [main] INFO c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:1776] Added 1 plain provider(s). Total 9
2023-11-02 10:30:36.781 [main] INFO ca.uhn.fhir.cr.config.ProviderLoader [ProviderLoader.java:53] loading provider: class ca.uhn.fhir.cr.r4.measure.CareGapsOperationProvider
2023-11-02 10:30:36.781 [main] INFO c.uhn.fhir.rest.server.RestfulServer [RestfulServer.java:1776] Added 1 plain provider(s). Total 10
import ca.uhn.fhir.cr.r4.questionnaire.QuestionnaireOperationsProvider;
fhirServer.registerProvider(thequestionnaireOperationsProvider); Blocker
So it looks like I need to define a Bean somewhere... not sure where |
Do you want to try running from main and see what happens? |
I had tried to build the main branch to deploy locally to test but it's broken, it doesn't even build |
My guess/assumption though is that it would probably give the same or a related error |
Yea ok, I think should pause on trying to use $populate then |
is this complete now? |
@pld not yet, I'll spare some time this week to see if I can close it out |
No worries, I certainly think this is higher priority, I wasn't sure if this was left open by mistake because I thought I saw documentation that covered this feature when I was using the translation generation in fct |
Overview
Some projects have a lot of questionnaires, with this functionality it will be possible to quickly generate questionnaire responses which can be used to test the extraction of resources, validation of app configs etc
Currently this is done manually
We can use tools like java-faker or datafaker to help with the actual dummy data generation
The result needs to account for special cases like skip logic. For example if one question asks for the gender and there is a subsequent question that is only relevant to female responders, that answer should only be answered when expected.
We would also want to extract and validate the data after generation. For valiation we can ideally use the same implementation from validate fhir resources
Implementation spec.
Add a new sub command
generateResponses
to efcitysample commands:
input
-i
and--input
as an aliasoutput
Acceptance Criteria
generateResponses
added, taking in a path to a questionnaire resourceResources
The text was updated successfully, but these errors were encountered: