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
D_GetFHIR4AllergiesSearchInt-Fhir401-BundleAPIAllergiesFHIR4
BinaryD_GetFHIR4BinarySearchInt-Fhir401-BundleAPIBinaryFHIR4
Care PlanD_GetFhir4CarePlanReadReadInt-Fhir401-CarePlanAPICarePlanReadFHIR4
D_GetFHIR4CarePlanSearchInt-Fhir401-BundleAPICarePlanFHIR4
Condition (Problem)D_GetFHIR4ConditionReadReadInt-Fhir401-ConditionAPIConditionReadFHIR4
D_GetFHIR4ConditionSearchInt-Fhir401-BundleAPIConditionFHIR4
CoverageD_GetFHIR4CoverageReadReadInt-Fhir401-CoverageAPICoverageReadFHIR4
D_GetFHIR4CoverageSearchInt-Fhir401-BundleAPICoverageFHIR4
DeviceD_GetFHIR4DeviceReadReadInt-Fhir401-DeviceAPIDeviceReadFHIR4
D_GetFHIR4DeviceSearchInt-Fhir401-BundleAPIDeviceFHIR4
Diagnostic ReportD_GetFHIR4DiagnosticReportReadReadInt-Fhir401- DiagnosticReportAPIDiagnosticReportReadFHIR4
D_GetFHIR4DiagnosticReportSearchInt-Fhir401-BundleAPIDiagnosticReportFHIR4
Document ReferenceD_GetFHIR4DocumentReferenceReadReadInt-Fhir401-DocumentReferenceAPIDocumentReferenceReadFHIR4
D_GetFHIR4DocumentReferenceSearchInt-Fhir401-BundleAPIDocumentReferenceFHIR4
EncounterD_GetFHIR4EncounterReadReadInt-Fhir401-EncounterAPIEncounterReadFHIR4
D_GetFHIR4EncounterSearchInt-Fhir401-BundleAPIEncounterFHIR4
Explanation of BenefitsD_GetFHIR4EOBReadReadInt-Fhir401-ExplanationOfBenefitAPIExplanationOfBenefitReadFHIR4
D_GetFHIR4EOBSearchInt-Fhir401-BundleAPIExplanationOfBenefitFHIR4
Episode of CareD_GetFHIR4EpisodeOfCareReadReadInt-Fhir401- EpisodeOfCareAPIEpisodeOfCareReadFHIR4
D_GetFHIR4EpisodeOfCareSearchInt-Fhir401-BundleAPIEpisodeOfCareFHIR4
Family Member HistoryD_GetFHIR4FamilyMemberHistoryReadReadInt-Fhir401- FamilyMemberHistoryAPIFamilyMemberHistoryReadFHIR4
D_GetFHIR4FamilyMemberHistorySearchInt-Fhir401-BundleAPIFamilyMemberHistoryFHIR4
GoalD_GetFHIR4GoalReadReadInt-Fhir401-GoalAPIGoalReadFHIR4
D_GetFHIR4GoalSearchInt-Fhir401-BundleAPIGoalFHIR4
Imaging StudyD_GetFHIR4ImagingStudyReadReadInt-Fhir401- ImagingStudyAPIImagingStudyReadFHIR4
D_GetFHIR4ImagingStudySearchInt-Fhir401-BundleAPIImagingStudyFHIR4
ImmunizationD_GetFHIR4ImmunizationReadReadInt-Fhir401- ImmunizationAPIImmunizationReadFHIR4
D_GetFHIR4ImmunizationSearchInt-Fhir401-BundleAPIImmunizationFHIR4
MedicationD_GetFHIR4MedicationReadReadInt-Fhir401-MedicationAPIMedicationReadFHIR4
D_GetFHIR4MedicationSearchInt-Fhir401-BundleAPIMedicationFHIR4
Medication DispenseD_GetFHIR4MedicationDispenseReadReadInt-Fhir401- MedicationDispenseAPIMedicationDispenseReadFHIR4
D_GetFHIR4MedicationDispenseSearchInt-Fhir401-BundleAPIMedicationDispenseFHIR4
Medication RequestD_GetFHIR4MedicationRequestReadReadInt-Fhir401-MedicationRequestAPIMedicationRequestReadFHIR4
D_GetFHIR4MedicationRequestSearchInt-Fhir401-BundleAPIMedicationRequestFHIR4
Medication StatementD_GetFHIR4MedicationStatementReadReadInt-Fhir401- MedicationStatementAPIMedicationStatementReadFHIR4
D_GetFHIR4MedicationStatementSearchInt-Fhir401-BundleAPIMedicationStatementFHIR4
ObservationD_GetFHIR4ObservationReadReadInt-Fhir401-ObservationAPIObservationReadFHIR4
D_GetFHIR4ObservationSearchInt-Fhir401-BundleAPIObservationFHIR4
PatientD_GetFHIR4PatientReadReadInt-Fhir401-PatientAPIPatientReadFHIR4
D_GetFHIR4PatientSearchInt-Fhir401-BundleAPIPatientFHIR4
PractitionerD_GetFHIR4PractitionerReadReadInt-Fhir401- PractitionerAPIPractitionerReadFHIR4
D_GetFHIR4PractitionerSearchInt-Fhir401-BundleAPIPractitionerFHIR4
Practitioner RoleD_GetFHIR4PractitionerRoleReadReadInt-Fhir401-PractitionerRoleAPIPractitionerRoleReadFHIR4
D_GetFHIR4PractitionerRoleSearchInt-Fhir401-BundleAPIPractitionerRoleFHIR4
ProcedureD_GetFHIR4ProcedureReadReadInt-Fhir401-ProcedureAPIProcedureReadFHIR4
D_GetFHIR4ProcedureSearchInt-Fhir401-BundleAPIProcedureFHIR4
ScheduleD_GetFHIR4ScheduleReadReadInt-Fhir401-ScheduleAPIScheduleReadFHIR4
D_GetFHIR4ScheduleSearchInt-Fhir401-BundleAPIScheduleFHIR4
SlotD_GetFHIR4SlotReadReadInt-Fhir401-SlotAPISlotReadFHIR4
D_GetFHIR4SlotSearchInt-Fhir401-BundleAPISlotFHIR4

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
D_GetFHIR4AllergiesEPICSearchInt-Fhir401-BundleAPIAllergiesFHIR4EPIC
ObservationD_GetFHIR4ObservationReadEPICReadInt-Fhir401-ObservationAPIObservationReadFHIR4EPIC
D_GetFHIR4ObservationEPICSearchInt-Fhir401-BundleAPIObservationFHIR4EPIC
PatientD_GetFHIR4PatientReadEPICReadInt-Fhir401-PatientAPIPatientReadFHIR4EPIC
D_GetFHIR4PatientEPICSearchInt-Fhir401-BundleAPIPatientFHIR4EPIC

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 https://fhir.epic.com/Documentation?docId=oauth2.

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.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us