FHIR API component
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:
Accessing FHIR APIs
- 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:
- Log in to Dev Studio by using the operator ID [email protected] and the password that you specified for that operator.
- Save a copy of the existing [email protected] operator and give it a name that identifies it as an FhirAdministrator operator.
- 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.
- Save the new operator record.
- Log in as the new operator that you created.
- 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.
Resource | Data Page | Operation | Data Type (Class) | Connect REST |
Allergy Intolerance | D_GetFHIR4AllergiesRead | Read | Int-Fhir401-AllergiesAPI | AllergiesReadFHIR4 |
D_GetFHIR4Allergies | Search | Int-Fhir401-BundleAPI | AllergiesFHIR4 | |
Binary | D_GetFHIR4Binary | Search | Int-Fhir401-BundleAPI | BinaryFHIR4 |
Care Plan | D_GetFhir4CarePlanRead | Read | Int-Fhir401-CarePlanAPI | CarePlanReadFHIR4 |
D_GetFHIR4CarePlan | Search | Int-Fhir401-BundleAPI | CarePlanFHIR4 | |
Condition (Problem) | D_GetFHIR4ConditionRead | Read | Int-Fhir401-ConditionAPI | ConditionReadFHIR4 |
D_GetFHIR4Condition | Search | Int-Fhir401-BundleAPI | ConditionFHIR4 | |
Coverage | D_GetFHIR4CoverageRead | Read | Int-Fhir401-CoverageAPI | CoverageReadFHIR4 |
D_GetFHIR4Coverage | Search | Int-Fhir401-BundleAPI | CoverageFHIR4 | |
Device | D_GetFHIR4DeviceRead | Read | Int-Fhir401-DeviceAPI | DeviceReadFHIR4 |
D_GetFHIR4Device | Search | Int-Fhir401-BundleAPI | DeviceFHIR4 | |
Diagnostic Report | D_GetFHIR4DiagnosticReportRead | Read | Int-Fhir401- DiagnosticReportAPI | DiagnosticReportReadFHIR4 |
D_GetFHIR4DiagnosticReport | Search | Int-Fhir401-BundleAPI | DiagnosticReportFHIR4 | |
Document Reference | D_GetFHIR4DocumentReferenceRead | Read | Int-Fhir401-DocumentReferenceAPI | DocumentReferenceReadFHIR4 |
D_GetFHIR4DocumentReference | Search | Int-Fhir401-BundleAPI | DocumentReferenceFHIR4 | |
Encounter | D_GetFHIR4EncounterRead | Read | Int-Fhir401-EncounterAPI | EncounterReadFHIR4 |
D_GetFHIR4Encounter | Search | Int-Fhir401-BundleAPI | EncounterFHIR4 | |
Explanation of Benefits | D_GetFHIR4EOBRead | Read | Int-Fhir401-ExplanationOfBenefitAPI | ExplanationOfBenefitReadFHIR4 |
D_GetFHIR4EOB | Search | Int-Fhir401-BundleAPI | ExplanationOfBenefitFHIR4 | |
Episode of Care | D_GetFHIR4EpisodeOfCareRead | Read | Int-Fhir401- EpisodeOfCareAPI | EpisodeOfCareReadFHIR4 |
D_GetFHIR4EpisodeOfCare | Search | Int-Fhir401-BundleAPI | EpisodeOfCareFHIR4 | |
Family Member History | D_GetFHIR4FamilyMemberHistoryRead | Read | Int-Fhir401- FamilyMemberHistoryAPI | FamilyMemberHistoryReadFHIR4 |
D_GetFHIR4FamilyMemberHistory | Search | Int-Fhir401-BundleAPI | FamilyMemberHistoryFHIR4 | |
Goal | D_GetFHIR4GoalRead | Read | Int-Fhir401-GoalAPI | GoalReadFHIR4 |
D_GetFHIR4Goal | Search | Int-Fhir401-BundleAPI | GoalFHIR4 | |
Imaging Study | D_GetFHIR4ImagingStudyRead | Read | Int-Fhir401- ImagingStudyAPI | ImagingStudyReadFHIR4 |
D_GetFHIR4ImagingStudy | Search | Int-Fhir401-BundleAPI | ImagingStudyFHIR4 | |
Immunization | D_GetFHIR4ImmunizationRead | Read | Int-Fhir401- ImmunizationAPI | ImmunizationReadFHIR4 |
D_GetFHIR4Immunization | Search | Int-Fhir401-BundleAPI | ImmunizationFHIR4 | |
Medication | D_GetFHIR4MedicationRead | Read | Int-Fhir401-MedicationAPI | MedicationReadFHIR4 |
D_GetFHIR4Medication | Search | Int-Fhir401-BundleAPI | MedicationFHIR4 | |
Medication Dispense | D_GetFHIR4MedicationDispenseRead | Read | Int-Fhir401- MedicationDispenseAPI | MedicationDispenseReadFHIR4 |
D_GetFHIR4MedicationDispense | Search | Int-Fhir401-BundleAPI | MedicationDispenseFHIR4 | |
Medication Request | D_GetFHIR4MedicationRequestRead | Read | Int-Fhir401-MedicationRequestAPI | MedicationRequestReadFHIR4 |
D_GetFHIR4MedicationRequest | Search | Int-Fhir401-BundleAPI | MedicationRequestFHIR4 | |
Medication Statement | D_GetFHIR4MedicationStatementRead | Read | Int-Fhir401- MedicationStatementAPI | MedicationStatementReadFHIR4 |
D_GetFHIR4MedicationStatement | Search | Int-Fhir401-BundleAPI | MedicationStatementFHIR4 | |
Observation | D_GetFHIR4ObservationRead | Read | Int-Fhir401-ObservationAPI | ObservationReadFHIR4 |
D_GetFHIR4Observation | Search | Int-Fhir401-BundleAPI | ObservationFHIR4 | |
Patient | D_GetFHIR4PatientRead | Read | Int-Fhir401-PatientAPI | PatientReadFHIR4 |
D_GetFHIR4Patient | Search | Int-Fhir401-BundleAPI | PatientFHIR4 | |
Practitioner | D_GetFHIR4PractitionerRead | Read | Int-Fhir401- PractitionerAPI | PractitionerReadFHIR4 |
D_GetFHIR4Practitioner | Search | Int-Fhir401-BundleAPI | PractitionerFHIR4 | |
Practitioner Role | D_GetFHIR4PractitionerRoleRead | Read | Int-Fhir401-PractitionerRoleAPI | PractitionerRoleReadFHIR4 |
D_GetFHIR4PractitionerRole | Search | Int-Fhir401-BundleAPI | PractitionerRoleFHIR4 | |
Procedure | D_GetFHIR4ProcedureRead | Read | Int-Fhir401-ProcedureAPI | ProcedureReadFHIR4 |
D_GetFHIR4Procedure | Search | Int-Fhir401-BundleAPI | ProcedureFHIR4 | |
Schedule | D_GetFHIR4ScheduleRead | Read | Int-Fhir401-ScheduleAPI | ScheduleReadFHIR4 |
D_GetFHIR4Schedule | Search | Int-Fhir401-BundleAPI | ScheduleFHIR4 | |
Slot | D_GetFHIR4SlotRead | Read | Int-Fhir401-SlotAPI | SlotReadFHIR4 |
D_GetFHIR4Slot | Search | Int-Fhir401-BundleAPI | SlotFHIR4 |
Likewise, we have below data pages with connectors configured to invoke EPIC FHIR sandbox.
Resource | Data Page | Operation | Data Type (Class) | Connect REST |
Allergy Intolerance | D_GetFHIR4AllergiesReadEPIC | Read | Int-Fhir401-AllergiesAPI | AllergiesReadFHIR4EPIC |
D_GetFHIR4AllergiesEPIC | Search | Int-Fhir401-BundleAPI | AllergiesFHIR4EPIC | |
Observation | D_GetFHIR4ObservationReadEPIC | Read | Int-Fhir401-ObservationAPI | ObservationReadFHIR4EPIC |
D_GetFHIR4ObservationEPIC | Search | Int-Fhir401-BundleAPI | ObservationFHIR4EPIC | |
Patient | D_GetFHIR4PatientReadEPIC | Read | Int-Fhir401-PatientAPI | PatientReadFHIR4EPIC |
D_GetFHIR4PatientEPIC | Search | Int-Fhir401-BundleAPI | PatientFHIR4EPIC |
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 name | Rule type | Usage |
D_GetFHIR4Patient | Data Page | Calls the connector and identifies the request and response mapping rules |
PatientFHIR4 | Connect REST | Calls 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.
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.
Previous topic PFHC FHIR application bundle Next topic PegaHC FHIR Module - Healthcare API infrastructure