Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

FHIR API component

Updated on October 19, 2021

The FHIR API infrastructure contains pre-configured connectors with specified endpoint URL and populates the returned result in data pages that map the result to Integration data model. The following diagram illustrates the flow of execution:

Pega Foundation for Healthcare Pega Foundation for Healthcare Pega Foundation for Healthcare Pega Foundation for Healthcare Pega Foundation for Healthcare Pega Foundation for Healthcare Pega Foundation for Healthcare Pega Foundation for Healthcare

Accessing FHIR APIs

  1. If you have imported the Pega Foundation for Healthcare demo application and sample operators as part of installation, log in to the application as FhirAdministrator using the password that you specified when you enabled this operator; to enable Pega-provided operators, see Enabling operators.

    Otherwise, complete the following steps to create a new operator ID:

    1. Log in to Dev Studio by using the operator ID [email protected] and the password that you specified for that operator.
    2. Save a copy of the existing [email protected] operator and give it a name that identifies it as an FhirAdministrator operator.
    3. Add Fhir:Administrators access group to the new operator record. Click the radio button to the left of the access group to select it as the default access group.
    4. Save the new operator record.
  2. Log in as the new operator that you created.
  3. Navigate to the desired Data Type (Refer to the list of published APIs) and expand the section to view the Data Page and the Connect REST rule.

FHIR API integration classes

The FHIR API infrastructure provides preconfigured integration classes that were auto- generated by the Connect REST wizard based on the published contracts for each Resource. This class structure defines the data model used in mapping the response data returned via API call. The classes are configured as Int-FHIR401-xxxxx as shown below.

List of Published FHIR APIs as part of FHIR component

The following list shows all the data pages and Connect REST APIs configured for read and search operations for each of the FHIR Resources supported in this release and described in the Overview section.

Note: The following data pages are configured with Endpoint Urls to invoke HAPI FHIR®© sandbox. The Endpoint URLs for all configured resources in Healthcare API are fetched through a data page called D_FHIRSettings which is explained later in the document.
Resource Data Page Operation Data Type (Class) Connect REST
Allergy IntoleranceD_GetFHIR4AllergiesReadReadInt-Fhir401-AllergiesAPIAllergiesReadFHIR4
Care PlanD_GetFhir4CarePlanReadReadInt-Fhir401-CarePlanAPICarePlanReadFHIR4
Condition (Problem)D_GetFHIR4ConditionReadReadInt-Fhir401-ConditionAPIConditionReadFHIR4
Diagnostic ReportD_GetFHIR4DiagnosticReportReadReadInt-Fhir401- DiagnosticReportAPIDiagnosticReportReadFHIR4
Document ReferenceD_GetFHIR4DocumentReferenceReadReadInt-Fhir401-DocumentReferenceAPIDocumentReferenceReadFHIR4
Explanation of BenefitsD_GetFHIR4EOBReadReadInt-Fhir401-ExplanationOfBenefitAPIExplanationOfBenefitReadFHIR4
Episode of CareD_GetFHIR4EpisodeOfCareReadReadInt-Fhir401- EpisodeOfCareAPIEpisodeOfCareReadFHIR4
Family Member HistoryD_GetFHIR4FamilyMemberHistoryReadReadInt-Fhir401- FamilyMemberHistoryAPIFamilyMemberHistoryReadFHIR4
Imaging StudyD_GetFHIR4ImagingStudyReadReadInt-Fhir401- ImagingStudyAPIImagingStudyReadFHIR4
ImmunizationD_GetFHIR4ImmunizationReadReadInt-Fhir401- ImmunizationAPIImmunizationReadFHIR4
Medication DispenseD_GetFHIR4MedicationDispenseReadReadInt-Fhir401- MedicationDispenseAPIMedicationDispenseReadFHIR4
Medication RequestD_GetFHIR4MedicationRequestReadReadInt-Fhir401-MedicationRequestAPIMedicationRequestReadFHIR4
Medication StatementD_GetFHIR4MedicationStatementReadReadInt-Fhir401- MedicationStatementAPIMedicationStatementReadFHIR4
PractitionerD_GetFHIR4PractitionerReadReadInt-Fhir401- PractitionerAPIPractitionerReadFHIR4
Practitioner RoleD_GetFHIR4PractitionerRoleReadReadInt-Fhir401-PractitionerRoleAPIPractitionerRoleReadFHIR4

Likewise, we have below data pages with connectors configured to invoke EPIC FHIR sandbox.

Resource Data Page Operation Data Type (Class) Connect REST
Allergy IntoleranceD_GetFHIR4AllergiesReadEPICReadInt-Fhir401-AllergiesAPIAllergiesReadFHIR4EPIC

Epic FHIR sandbox supports using the OAuth 2.0 framework to authenticate and authorize applications. Hence, we need to configure authentication profile with oAuth2.0 to be able to integrate with EPIC FHIR sandbox. For more details, refer to OAuth 2.0 tutorial on

Above OOTB data pages are configured with a sample Authentication profile called ‘EPICAuthentication’ as shown below.

You need to update the configuration by following the OAuth 2.0 tutorial to be able to run these data pages to invoke the service endpoints exposed by Open EPIC. Refer to Pega online Help for additional information on configuring Authentication, Security Settings, and Error Handling.

Detailed view of a Resource API in FHIR component:

The sample rules shown in the next few sections are shown using the “Member (Patient)” resource as an example. Each published resource API has similar rules associated with it.

Key rules in FHIR API execution

Rule nameRule typeUsage
D_GetFHIR4PatientData PageCalls the connector and identifies the request and response mapping rules
PatientFHIR4Connect RESTCalls the REST Service using endpoint URL

As shown below, the Source for the datapage is configured as a Connector which invokes the external system REST service using the endpoint URL. The Endpoint URLs for all configured services in Healthcare API are fetched through a dynamic settings data page called D_FHIRSettings.

Connect REST rule

The Connect REST rule supports the interaction between Pega and other systems over the Hypertext Transfer Protocol (HTTP). It identifies the resource path endpoint URL of the source system to which this rule connects, and the parameters used to pass in the request. Refer to Pega online Help for additional information on configuring Authentication, Security Settings, and Error Handling.

Connect REST rule reads the EndpointUrl from application setting rule which in turn invokes D_FHIRSettings Data page.

Note: FHIR version is passed as a parameter.

Dynamic Settings End Point URL Management Data Page

The End Point URL resource path configured on a Connect REST rule cannot be modified once the rule is finalized and locked. To be able to maintain different endpoint system URLs and reference them dynamically, the Healthcare API configuration provides a pre-configured node level dynamic settings data page called D_FHIRSettings. As shown above, this page is referenced as a parameter to retrieve the EndPointURL for the given resource.

The data source configured to fetch the end point URL is a Data Transform rule called LoadFHIR4Settings. The rule is configured with URLs for a test reference system used internally for testing the Healthcare APIs. The rule is marked for Extension and is expected to be updated in your application with URLs for your own source systems for the different resources.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us