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

Java validator testing switch #14

Open
2 of 3 tasks
alexmbennett2 opened this issue Feb 4, 2022 · 3 comments
Open
2 of 3 tasks

Java validator testing switch #14

alexmbennett2 opened this issue Feb 4, 2022 · 3 comments

Comments

@alexmbennett2
Copy link
Contributor

alexmbennett2 commented Feb 4, 2022

Using thejava validator to validate resources in the python testing folder. Currently using HAPI but could be nice to have the java validator as another option since its quicker to use.

To Do

  • Add popup warning for Java Validator use when testing
  • Validate CodeSystems and ValueSets with Java Validator
  • Decouple database loading of fhir jsons and validation of fhir json
    • Store the files locally? Or commit them as static tests?
@alexmbennett2
Copy link
Contributor Author

alexmbennett2 commented Feb 25, 2022

Created a branch to test this. Java validator is useful for testing individual resources but is slow when testing all resources at once (vs HAPI). The motivation for integration the Java validator is the development time using HAPI. The processes look like this:

  • HAPI Validation
    1 Create/update FSH files
    2. Generate Implementation Guide(IG) from FSH files
    3. Post IG to the github repo
    4. Point HAPI fhir to the new IG in the github repo
    5. Start up HAPI (~5-10 minutes)
    6. Validate resource
    7. If issue found, update FSH file and repeat steps 1-6
    • The whole process takes about 10-15 minutes so for iterative testing it can be a major slowdown
  • Java Validation
    1 Create/update FSH files
    2. Generate Implementation Guide(IG) from FSH files
    3. Output resource to json from Postgres
    4. Run java validator from the command line
    5. If issues found, update and repeat steps 1-4
    • The whole process takes about 3-5 minutes, so is a bit better for iterative development

@alexmbennett2
Copy link
Contributor Author

@alistairewj You had mentioned adding some static fhir test files in for Java validation. I had held off originally to avoid having any patient resources stored in git. If we are storing static fhir files, do you think I should cleanse them further than they are (ie patient ids are already uuid, birthdates shifted)

@alistairewj
Copy link
Contributor

Ideally we'd have say one patient's resources as we export them from the pipeline. Hopefully not too many lines of text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants