This template provides a boilerplate code for rapid implementation of FHIR APIs and creating, accessing and manipulating FHIR resources.
Module/Element | Version |
---|---|
FHIR version | r4 |
Implementation Guide | http://hl7.org/fhir |
Profile URL | http://hl7.org/fhir/StructureDefinition/Organization |
- ballerinax/health.fhir.r4
- ballerinax/health.fhirr4
- ballerinax/health.fhir.r4.international401
This template includes a Ballerina service for Organization FHIR resource with following FHIR interactions.
- READ
- VREAD
- SEARCH
- CREATE
- UPDATE
- PATCH
- DELETE
- HISTORY-INSTANCE
- HISTORY-TYPE
Pull the template from central
` bal new -t ballerinax/health.fhir.templates.international401.organization OrganizationAPI `
- Run the Ballerina project created by the service template by executing bal run from the root.
- Once successfully executed, Listener will be started at port 9090. Then you need to invoke the service using the following curl command
$ curl http://localhost:9090/fhir/r4/Organization
- Now service will be invoked and returns an Operation Outcome, until the code template is implemented completely.
- Add profile type to the aggregated resource type. Eg:
public type Organization r4:Organization|<Other_Organization_Profile>;
.- Add the new profile URL in
api_config.bal
file. - Add as a string inside the
profiles
array. - Eg:
profiles: ["http://hl7.org/fhir/StructureDefinition/Organization", "new_profile_url"]
- Add the new profile URL in