PegaHC FHIR Module - Healthcare API infrastructure
The Healthcare API infrastructure contains pre-configured connectors with specified endpoint URL and populates the returned result in data pages that map the result to Healthcare data model. The following diagram illustrates the flow of execution:
Accessing HC 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
HCFHIRAdministrator 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 a HC Fhir Administrator operator.
- Add PegaHCFhir: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 Dev Studio > Data Model > View external data
entities.The system shows all pre-configured Data Types that have APIs configured for them. This includes FHIR and non- FHIR APIs.
- 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.
List of Published FHIR APIs as part of PegaHC FHIR Module
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 | DataPage | Operation | Data Type(Class) | ConnectREST |
Allergy Intolerance | D_FHIR4AllergyRead | Read | PegaHC-Data-Allergies | AllergiesReadFHIR4 |
D_FHIR4Allergy | Search | PegaHC-Data-Allergies | AllergiesFHIR4 | |
Care Plan | D_FHIR4CarePlanRead | Read | PegaHC-Data-CarePlan | CarePlanReadFHIR4 |
D_FHIR4CarePlan | Search | PegaHC-Data-CarePlan | CarePlanFHIR4 | |
Condition (Problem) | D_FHIR4ClinicalConditi onRead | Read | PegaHC-Data- ClinicalCondition | ConditionReadFHIR4 |
D_FHIR4ClinicalConditi on | Search | PegaHC-Data- ClinicalCondition | ConditionFHIR4 | |
Coverage | D_FHIR4CoverageRea d | Read | PegaHC-Data-Policy | CoverageReadFHIR4 |
D_FHIR4Coverage | Search | PegaHC-Data-Policy | CoverageFHIR4 | |
Device | D_FHIR4DeviceRead | Read | PegaHC-Data-Device | DeviceReadFHIR4 |
D_FHIR4Device | Search | PegaHC-Data-Device | DeviceFHIR4 | |
Diagnostic Report | D_FHIR4DiagnosticRep ortRead | Read | PegaHC-Data- DiagnosticReport | DiagnosticReportReadF HIR4 |
D_FHIR4DiagnosticRep ort | Search | PegaHC-Data- DiagnosticReport | DiagnosticReportFHIR4 | |
Encounter | D_FHIR4EncounterRea d | Read | PegaHC-Data- Encounter | EncounterReadFHIR4 |
D_FHIR4Encounter | Search | PegaHC-Data- Encounter | EncounterFHIR4 | |
Explanation of Benefits | D_FHIR4EOBRead | Read | PegaHC-Data-Claim | ExplanationOfBenefitRe adFHIR4 |
D_FHIR4EOB | Search | PegaHC-Data-Claim | ExplanationOfBenefitFH IR4 | |
Episode of Care | D_FHIR4EpisodeOfCar eRead | Read | PegaHC-Data- EpisodeOfCare | EpisodeOfCareReadFHI R4 |
D_FHIR4EpisodeOfCar e | Search | PegaHC-Data- EpisodeOfCare | EpisodeOfCareFHIR4 | |
Family Member History | D_FHIR4FamilyHistory Read | Read | PegaHC-Data- MedicalHistory | FamilyMemberHistoryR eadFHIR4 |
D_FHIR4FamilyHistory | Search | PegaHC-Data- MedicalHistory | FamilyMemberHistoryF HIR4 | |
Goal | D_FHIR4GoalRead | Read | PegaHC-Data-Goal | GoalReadFHIR4 |
D_FHIR4Goal | Search | PegaHC-Data-Goal | GoalFHIR4 | |
Imaging Study | D_FHIR4ImagingStudy Read | Read | PegaHC-Data- ImagingStudy | ImagingStudyReadFHIR 4 |
D_FHIR4ImagingStudy | Search | PegaHC-Data- ImagingStudy | ImagingStudyFHIR4 | |
Immunization | D_FHIR4Immunization Read | Read | PegaHC-Data- Immunization | ImmunizationReadFHIR 4 |
D_FHIR4Immunization | Search | PegaHC-Data- Immunization | ImmunizationFHIR4 | |
Medication | D_FHIR4MedicationRe ad | Read | PegaHC-Data- PatientMedications | MedicationReadFHIR4 |
D_FHIR4Medication | Search | PegaHC-Data- PatientMedications | MedicationFHIR4 | |
Medication Dispense | D_FHIR4MedicationDi spenseRead | Read | PegaHC-Data- PatientMedications | MedicationDispenseRe adFHIR4 |
D_FHIR4MedicationDi spense | Search | PegaHC-Data- PatientMedications | MedicationDispenseFHI R4 | |
Medication Statement | D_FHIR4MedicationSt atementRead | Read | PegaHC-Data- PatientMedications | MedicationStatementR eadFHIR4 |
D_FHIR4MedicationSt atement | Search | PegaHC-Data- PatientMedications | MedicationStatementF HIR4 | |
Observation | D_FHIR4ObservationR ead | Read | PegaHC-Data- Observation | ObservationReadFHIR4 |
D_FHIR4Observation | Search | PegaHC-Data- Observation | ObservationFHIR4 | |
Patient | D_FHIR4PatientRead | Read | PegaHC-Data-Party- Member | PatientReadFHIR4 |
D_FHIR4Patient | Search | PegaHC-Data-Party- Member | PatientFHIR4 | |
Practitioner | D_FHIR4PractitionerR ead | Read | PegaHC-Data-Party- Provider-Practitioner | PractitionerReadFHIR4 |
D_FHIR4Practitioner | Search | PegaHC-Data-Party- Provider-Practitioner | PractitionerFHIR4 | |
Practitioner Role | D_FHIR4PractitionerR oleRead | Read | PegaHC-Data-Party- Provider | PractitionerRoleReadFH IR4 |
D_FHIR4PractitionerR ole | Search | PegaHC-Data-Party- Provider | PractitionerRoleFHIR4 | |
Procedure | D_Fhir4ClinicalProced ureRead | Read | PegaHC-Data- ClinicalProcedure | ProcedureReadFHIR4 |
D_FHIR4ClinicalProced ure | Search | PegaHC-Data- ClinicalProcedure | ProcedureFHIR4 | |
Schedule | D_FHIR4ScheduleRead | Read | PegaHC-Data-Goal | ScheduleReadFHIR4 |
D_FHIR4Schedule | Search | PegaHC-Data-Goal | ScheduleFHIR4 | |
Slot | D_FHIR4SlotRead | Read | PegaHC-Data- AppointmentSchedule | SlotReadFHIR4 |
D_FHIR4Slot | Search | PegaHC-Data-AppointmentSchedule | SlotFHIR4 |
Likewise, we have below data pages with connectors configured to invoke EPIC FHIR sandbox.
Resource | DataPage | Operation | Data Type(Class) | ConnectREST |
Allergy Intolerance | D_FHIR4AllergyRe adEPIC | Read | PegaHC-Data-Allergies | AllergiesReadFHIR4EPIC |
D_FHIR4AllergyEP IC | Search | PegaHC-Data-Allergies | AllergiesFHIR4EPIC | |
Observatio n | D_FHIR4Observat ionReadEPIC | Read | PegaHC-Data-Observation | ObservationReadFHIR4EPIC |
D_FHIR4Observat ionEPIC | Search | PegaHC-Data-Observation | ObservationFHIR4EPIC | |
Patient | D_FHIR4PatientR eadEPIC | Read | PegaHC-Data-Party- Member | PatientReadFHIR4EPIC |
D_FHIR4PatientE PIC | Search | PegaHC-Data-Party- Member | 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 PegaHC FHIR Module:
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_FHIR4Patient | Data Page | Calls the connector and identifies the request and response mapping rules. |
PatientFHIR4 | Connect REST | Calls the REST Service using endpoint URL. |
MapToPatients4 | Data Transform | Wrapper rule which calls the main mapping data transform rule. |
MapToPatient4Details | Data Transform | Mapping data transform which maps the results to the response. |
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 provide 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.
Map Response Data
The MapToPatients4 data transform initiates the mapping of the response received from the source system based on the number of result pages received. The rule initiates mapping for each Member Resource in the response.
- Post_MapToPatients4_Ext
- Post_MapToPatients4_Ext
- The data received as JSON format is stored in Param.Response which is then mapped to appropriate object class in your application. In this example, the returned member information is mapped to member class using the MapToPatient4Details data transform rule.
Previous topic FHIR API component Next topic FHIR APIs: key rules