onaio / fhir-tooling

A command line utility to support FHIR Core content authoring
Other
2 stars 1 forks source link

HAPI FHIR Validation Server setup and deployment #306

Open ndegwamartin opened 2 weeks ago

ndegwamartin commented 2 weeks ago

We need to have a running HAPI FHIR server in order to support validation. Our implementation requires a live server to be running - see https://github.com/onaio/fhir-tooling/issues/305

We could have the server deployed for the validation and maybe use the same server for terminologies as per the FHIR spec (Documentation on when to use a Terminology Service in FHIR)

Factors to consider:

  1. Specs of the server - If the server is a validation server only we need less computing resources than a terminology server (for all projects)
  2. Server software versions - We can deploy the latest JPA + HAPI FHIR Server or the current one we have in our deployments to be aligned to current production
  3. HAPI FHIR Modules - We need to enable the Clinical Reasoning module when deploying - see CR flag deployment script
Wambere commented 2 weeks ago

One more thing, for the QuestionnaireResponse to be generated as expected we need to have cr enabled set to true

ref link

pld commented 2 weeks ago

is the other option to spin up a HAPI server in the CI flow, run tests against that, then spin it down, but problem w/this is that it'd be too slow?

ndegwamartin commented 2 weeks ago

is the other option to spin up a HAPI server in the CI flow, run tests against that, then spin it down, but problem w/this is that it'd be too slow?

Should be feasible to implement but will be a higher LOE and C.I. will probably be slower when running the validation

ndegwamartin commented 2 weeks ago

Here are the final steps based on the stated factors:

  1. We only need to focus on validation for now so a low spec server is fine
  2. For the JPA + HAPI server lets use the latest - https://github.com/hapifhir/hapi-fhir-jpaserver-starter
  3. The CR flag should be enabled as highlighted above - Sample config here
  4. We can use the Google Gateway for auth - Google FHIR Gateway 0.4.0 and release artifacts here and here (docker)
  5. Gateway configurations are as on the main README - https://github.com/google/fhir-gateway
ndegwamartin commented 2 weeks ago

We can investigate whether it is feasible to whitelist requests from Github(C.I.) and then use that as the auth mechanism in which case we will not need the Keycloak and Gateway setups (thanks for this @pld )

cc @bennsimon @dubdabasoduba

dubdabasoduba commented 2 weeks ago

@ndegwamartin what are these used for? If they are used somehow for validation do we need the server? I haven't checked so I might be sending you on a wild goose chase.

ndegwamartin commented 1 week ago

@ndegwamartin what are these used for? If they are used somehow for validation do we need the server? I haven't checked so I might be sending you on a wild goose chase.

That is a config on the server side, i.e HAPI itself . The above configures the url as logical identifiers - https://hapifhir.io/hapi-fhir/docs/server_jpa/configuration.html#logical-references

Note, our validation approach requires the server with or without that enabled since we use $populate operations for the QR generation cc @Wambere