Skip to content
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

Enhancement to support validation via CI #305

Closed
ndegwamartin opened this issue Oct 23, 2024 · 5 comments
Closed

Enhancement to support validation via CI #305

ndegwamartin opened this issue Oct 23, 2024 · 5 comments
Assignees
Labels
Blocked Something is blocked efsity FCT features Validation

Comments

@ndegwamartin
Copy link
Contributor

A follow up task to issue #199 based on the comment here #281 (comment)

As part of validation efsity tries to connect to the FHIR Base URL server defined for the QuestionnaireResponse generated here for validation - https://github.com/onaio/fhir-tooling/blob/199-validate-sm/efsity/src/main/java/org/smartregister/command/ValidateStructureMapCommand.java#L106-L115 leading to the exception here :

Screenshot 2024-10-17 at 19 10 03

This can be reproduced by running the structure map validation command e.g. via command line to validate.

@ndegwamartin
Copy link
Contributor Author

Did some investigating, this is the block of code that does the the server POST request - https://github.com/onaio/fhir-tooling/blob/main/efsity/src/main/java/org/smartregister/command/QuestionnaireResponseGeneratorCommand.java#L182-L185

Do we need to perform a server submission when doing validation?

@Wambere
Copy link
Contributor

Wambere commented Oct 24, 2024

Hey @ndegwamartin, yes we do
The way we are validating the structureMap is using the questionnaire. We use the questionnaire to generate a questionnaireResponse which we then use to extract resources and confirm that all that was expected from the structureMap is actually created, and valid.
Using the populate mode, the way the questionnaireResponse is generated is by hiting the /$poulate endpoint on the questionnaire. So the questionnaire has to exist first before we can generate a questionnaireResponse from it.
The ai mode does not require a server but it also unfortunately does not always generate valid resources (compared to the populate mode)

The idea for CI was to just have a job that starts up the FHIR server which can be used for the process. An alternative would be to deploy a server just for this that the CI can connect to... depending on whichever makes more sense

@ndegwamartin
Copy link
Contributor Author

Hey @ndegwamartin, yes we do The way we are validating the structureMap is using the questionnaire. We use the questionnaire to generate a questionnaireResponse which we then use to extract resources and confirm that all that was expected from the structureMap is actually created, and valid. Using the populate mode, the way the questionnaireResponse is generated is by hiting the /$populate endpoint on the questionnaire. So the questionnaire has to exist first before we can generate a questionnaireResponse from it. The ai mode does not require a server but it also unfortunately does not always generate valid resources (compared to the populate mode)

The idea for CI was to just have a job that starts up the FHIR server which can be used for the process. An alternative would be to deploy a server just for this that the CI can connect to... depending on whichever makes more sense

Got it. So then yeah I think we need to reach out to SRE on this so that they can provision a validation server. Perhaps generically it should be an OpenSRP Terminology server that we can use to also provide our custom ones cc @dubdabasoduba @pld

@ndegwamartin
Copy link
Contributor Author

ndegwamartin commented Oct 24, 2024

This issue is blocked by - #306 . It will be fixed by updating the hardcoded URL of the validation server to the new host after deployment.

@sharon2719 sharon2719 added the Blocked Something is blocked label Oct 31, 2024
@Wambere
Copy link
Contributor

Wambere commented Dec 10, 2024

No longer necessary since https://github.com/onaio/fhir-resources/pull/3589 was already closed

@Wambere Wambere closed this as completed Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked Something is blocked efsity FCT features Validation
Projects
None yet
Development

No branches or pull requests

3 participants