Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.74 KB

File metadata and controls

48 lines (35 loc) · 1.74 KB

Organization Template

Template Overview

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

Dependency List

  • 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

Prerequisites

Pull the template from central

` bal new -t ballerinax/health.fhir.templates.international401.organization OrganizationAPI `

Run the template

  • 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.

Adding a Custom Profile/Combination of Profiles

  • 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"]