Limiting hapi fhir to a small set of resource types using the application.yaml

131 views
Skip to first unread message

Johnathan Hill

unread,
May 17, 2024, 3:48:02 AM5/17/24
to HAPI FHIR
Hi
We are using the following in our application.yaml file

hapi:
  fhir:
    server:
      # Supported resource types
      resourceTypes:
        - Practitioner
        - PractitionerRole
        - Organization
        - Location
        - HealthcareService
    ### This enables the swagger-ui at /fhir/swagger-ui/index.html as well as the /fhir/api-docs (see https://hapifhir.io/hapi-fhir/docs/server_plain/openapi.html)
    openapi_enabled: true
    ### This is the FHIR version. Choose between, DSTU2, DSTU3, R4 or R5
    fhir_version: R4
    advanced_lucene_indexing: true
    server_address: 'https://fhir-calmhsa-provider.ehn-dev.net/fhir'
    #mdm_enabled: true
    cors:
      allow_Credentials: true
      # These are allowed_origin patterns, see: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/cors/CorsConfiguration.html#setAllowedOriginPatterns-java.util.List-
      allowed_origin:
        - '*'
However when we update aws and restart the pod, the conformance button on the hapi fhir start page still displays all the resources  and the page still lists all the resources. Any help will be greatly appreciated as we have a deadline coming up in 2 days. If anyone has a working application.yaml using supported resource type we would greatly appreciate if you could share. Thanks in advance!!!!!

James Agnew

unread,
May 17, 2024, 3:52:49 AM5/17/24
to Johnathan Hill, HAPI FHIR
I'm not the JPA Starter config expert, but my assumption is that you have the name of the property wrong (resourceTypes vs supported_resource_types). See here, which might be a good place to put a breakpoint and debug if it's still not working: https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/66f1af355105a98d69eb3640f2840e8fa24f951c/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java#L245

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/a4265e6c-2d93-485f-bab1-100e5c19c8d6n%40googlegroups.com.

Johnathan Hill

unread,
May 21, 2024, 7:47:29 AM5/21/24
to HAPI FHIR
Awesome that was the issue!

Aeronadams Co1144

unread,
May 27, 2024, 1:30:59 PM5/27/24
to HAPI FHIR
Reply all
Reply to author
Forward
0 new messages