FHIR API technical specification guide
FHIR API overview
FHIR – Fast Healthcare Interoperability Resources (hl7.org/fhir) is a next generation standards framework created by the HL7 organization. It is designed to support the interoperability and exchange of healthcare related information including clinical, administrative, public health, and research data between organizations. The specification leverages widely used RESTful APIs that use HTTP requests to GET, PUT, POST, and DELETE data.
FHIR is based on “Resources” which are common building blocks for all data exchanges. Resources are represented as either XML or JSON.
The Pega FHIR APIs in Pega Foundation for Healthcare offer pre-configured REST/JSON connectors to integrate your application with external electronic medical / health record (EMR/EHR) systems. You can also integrate your application with other clinical data repositories and fetch information about patients or consumers that you manage in your application.
This version of the Pega FHIR APIs supports the current - v4.0.1: R4 Mixed Normative and STU - version of the FHIR Standard in the REST/JSON format for the following Resources:
Resource | Description |
Allergy Intolerance | Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. |
Binary | A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, PDF file, ZIP file, and so on. |
Care Plan | Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group, or community for a period of time, possibly limited to care for a specific condition or set of conditions. |
Condition (Problem) | Use to record detailed information about conditions, problems or diagnoses recognized by a clinician. There are many uses including: recording a diagnosis during an encounter; populating a problem list or a summary statement, such as a discharge summary. |
Coverage | This resource is intended to provide the high-level identifiers and descriptors of an insurance plan, typically the information which would appear on an insurance card, which may be used to pay, in part or in whole, for the provision of health care products and services. |
Device | This resource identifies an instance of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health. Non-medical devices may include items such as a machine, cellphone, computer, application, etc. |
Diagnostic Report | The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. |
Document Reference | Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document. |
Encounter | An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. |
Explanation of Benefits | This resource provides the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. |
Episode of Care | An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. |
Family Member History | Significant health events and conditions for a person related to the patient relevant in the context of care for the patient. |
Goal | Describes the intended objective(s) for a patient, group, or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, among others. |
Imaging Study | Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service- Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (for example, X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. |
Immunization | Describes the event of a patient being administered a vaccination or a record of a vaccination as reported by a patient, a clinician or another party and may include vaccine reaction information and what vaccination protocol was followed. |
Medication | This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication. |
Medication Dispense | Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. |
Medication Statement | A record of a medication that is being consumed by a patient. A Medication Statement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from e.g. the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. |
Observation | Measurements and simple assertions made about a patient, device, or other subject. |
Patient | Demographics and other administrative information about an individual or animal receiving care or other health-related services. |
Practitioner | A person who is directly or indirectly involved in the provisioning of healthcare. |
Practitioner Role | Practitioner Role covers the recording of the location and types of services that Practitioners are able to provide for an organization |
Procedure | An action that is or was performed on a patient. This can be a physical intervention like an operation, or less invasive like counseling or hypnotherapy. |
Schedule | A container for slot(s) of time that may be available for booking appointments. |
Slot | A slot of time on a schedule that may be available for booking appointments. |
For additional information on the Resources and the Standard object model, refer to http://hl7.org/fhir/resourcelist.html.
To make use of these APIs, you will need to connect to a source clinical data system that has a FHIR server. Pega used two publicly available sandbox environments for testing the APIs:
- HAPI FHIR - http://hapi.fhir.org/ – This is a public test server available for testing FHIR®© APIs
- Epic FHIR - https://fhir.epic.com/ – This is an open source light weight access layer made available for Epic.
PFHC FHIR application bundle
PegaHCFhir Application bundle in PFHC media contains below modules:
FHIR APIs: key rules
Allergy intolerance: GET allergy intolerance details
The FHIR AllergyIntolerance resource defines clinical information about a patient’s allergic response to a substance. The search interaction enables the client to query for all allergies associated with a given patient's medical history for a given search parameter.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Allergies | ||
Allergies | Service REST | |
D_FHIR4AllergyRead | Data Page | To call connector and map request and response |
AllergiesReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToAllergy4Read | Data Transform | To map result data to data page |
MapToAllergy4Details | Data Transform | Map results to PFHC Allergy object |
Pre_MapToAllergy4Read_Ext | Data Transform | To be used for extension purpose |
Post_MapToAllergy4Read_Ext | Data Transform | To be used for extension purpose |
Pre_MapToAllergy4Details_Ext | Data Transform | To be used for extension purpose |
Post_MapToAllergy4Details_Ext | Data Transform | To be used for extension purpose |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Allergies | ||
Allergies | Service REST | |
D_FHIR4Allergy | Data Page | To call connector and map request and response |
AllergiesFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToAllergy4 | Data Transform | To map result data to data page |
MapToAllergy4Details | Data Transform | Map results to PFHC Allergy object |
Pre_MapToAllergy4_Ext | Data Transform | To be used for extension |
Post_MapToAllergy4_Ext | Data Transform | To be used for extension |
Pre_MapToAllergy4Details_Ext | Data Transform | To be used for extension |
Post_MapToAllergy4Details_Ext | Data Transform | To be used for extension |
Care Plan: GET CarePlan details
The FHIR CarePlan resource is a broad container for summarizing the plan of treatment for a patient. The Search interaction enables the client to query for the care plan for a given patient with a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-CarePlan | ||
CarePlan | Service REST | |
D_FHIR4CarePlanRead | Data Page | To call connector and map request and response |
CarePlanReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToCarePlan4Read | Data Transform | To map result data to data page |
MapToCarePlan4Details | Data Transform | Map results to PFHC Care Plan object |
Pre_MapToCarePlan4Read_Ext | Data Transform | To be used for extension |
Post_MapToCarePlan4Read_Ext | Data Transform | To be used for extension |
Pre_MapToCarePlan4Details_Ext | Data Transform | To be used for extension |
Post_MapToCarePlan4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-CarePlan | ||
CarePlan | Service REST | |
D_FHIR4CarePlan | Data Page | To call connector and map request and response |
CarePlanFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToCarePlan4 | Data Transform | To map result data to data page |
MapToCarePlan4Details | Data Transform | Map results to PFHC Care Plan object |
Pre_MapToCarePlan4_Ext | Data Transform | To be used for extension |
Post_MapToCarePlan4_Ext | Data Transform | To be used for extension |
Pre_MapToCarePlan4Details_Ext | Data Transform | To be used for extension |
Post_MapToCarePlan4Details_Ext | Data Transform | To be used for extension |
Condition: GET Condition list
The FHIR Condition resource defines detailed information about a Condition, problem, or diagnosis relevant to the health of the patient. The Search interaction enables the client to query for all problems associated with a given patient's Conditions given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-ClinicalCondition | ||
Condition | Service REST | |
D_FHIR4ClinicalConditionRead | Data Page | To call connector and map request and response |
ConditionReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToClinicalCondition4Read | Data Transform | To map result data to data page |
MapToClinicalCondition4Details | Data Transform | Map results to PFHC Clinical Condition object |
Pre_MapToClinicalCondition4Read_Ext | Data Transform | To be used for extension |
Post_MapToClinicalCondition4Read_Ext | Data Transform | To be used for extension |
Pre_MapToClinicalCondition4Details_Ext | Data Transform | To be used for extension |
Post_MapToClinicalCondition4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-ClinicalCondition | ||
Condition | Service REST | |
D_FHIR4ClinicalCondition | Data Page | To call connector and map request and response |
ConditionFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToClinicalCondition4 | Data Transform | To map result data to data page |
MapToClinicalCondition4Details | Data Transform | Map results to PFHC Clinical Condition object |
Pre_MapToClinicalCondition4_Ext | Data Transform | To be used for extension |
Post_MapToClinicalCondition4_Ext | Data Transform | To be used for extension |
Pre_MapToClinicalCondition4Details_Ext | Data Transform | To be used for extension |
Post_MapToClinicalCondition4Details_Ext | Data Transform | To be used for extension |
Coverage: GET Coverage Detail
This resource is intended to provide the high-level identifiers and descriptors of an insurance plan, typically the information which would appear on an insurance card, which may be used to pay, in part or in whole, for the provision of health care products and services.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Policy | ||
Coverage | Service REST | |
D_FHIR4CoverageRead | Data Page | To call connector and map request and response |
CoverageReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToCoverage4Read | Data Transform | To map result data to data page |
MapToCoverage4Details | Data Transform | Map results to PFHC Coverage object |
Pre_MapToCoverage4Read_Ext | Data Transform | To be used for extension |
Post_MapToCoverage4Read_Ext | Data Transform | To be used for extension |
Pre_MapToCoverage4Details_Ext | Data Transform | To be used for extension |
Post_MapToCoverage4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Policy | ||
Coverage | Service REST | |
D_FHIR4Coverage | Data Page | To call connector and map request and response |
CoverageFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToCoverage4 | Data Transform | To map result data to data page |
MapToCoverage4Details | Data Transform | Map results to PFHC Coverage object |
Pre_MapToCoverage4_Ext | Data Transform | To be used for extension |
Post_MapToCoverage4_Ext | Data Transform | To be used for extension |
Pre_MapToCoverage4Details_Ext | Data Transform | To be used for extension |
Post_MapToCoverage4Details_Ext | Data Transform | To be used for extension |
Device: GET Device details
The FHIR Device resource describes information about a specific patient's durable, manufactured medical items. The Search interaction enables the client to query for the devices of a patient given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Device | ||
Device | Service REST | |
D_FHIR4DeviceRead | Data Page | To call connector and map request and response |
DeviceReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToDevice4Read | Data Transform | To map result data to data page |
MapToDevice4Details | Data Transform | Map results to PFHC Device object |
Pre_MapToDevice4Read_Ext | Data Transform | To be used for extension |
Post_MapToDevice4Read_Ext | Data Transform | To be used for extension |
Pre_MapToDevice4Details_Ext | Data Transform | To be used for extension |
Post_MapToDevice4Details_ExtP | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Device | ||
Device | Service REST | |
D_FHIR4Device | Data Page | To call connector and map request and response |
DeviceFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToDevice4 | Data Transform | To map result data to data page |
Pre_MapToDevice4_Ext | Data Transform | To be used for extension |
Post_MapToDevice4_Ext | Data Transform | To be used for extension |
Pre_MapToDevice4Details_Ext | Data Transform | To be used for extension |
Post_MapToDevice4Details_Ext | Data Transform | To be used for extension |
MapToDevice4Details | Data Transform | Map results to PFHC Device object |
Diagnostic Report: GET Diagnostic Reports list
The FHIR Diagnostic Report resource contains information about a single diagnostic service performed for a patient. The Search interaction enables the client to query for all diagnostic reports that have been filed for a patient given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-DiagnosticReport | ||
DiagnosticReport | Service REST | |
D_FHIR4DiagnosticReportRead | Data Page | To call connector and map request and response |
DiagnosticReportReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToDiagnosticReport4Read | Data Transform | To map result data to data page |
MapToDiagnosticReport4Details | Data Transform | Map results to PFHC Diagnostic Report object |
Pre_MapToDiagnosticReport4Read_Ext | Data Transform | To be used for extension purpose |
Post_MapToDiagnosticReport4Read_Ext | Data Transform | To be used for extension purpose |
Pre_MapToDiagnosticReport4Details_Ext | Data Transform | To be used for extension purpose |
Post_MapToDiagnosticReport4Details_Ext | Data Transform | To be used for extension purpose |
Search operation
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-DiagnosticReport | ||
DiagnosticReport | Service REST | |
D_FHIR4DiagnosticReport | Data Page | To call connector and map request and response |
DiagnosticReportFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToDiagnosticReport4 | Data Transform | To map result data to data page |
MapToDiagnosticReport4Details | Data Transform | Map results to HCIF Diagnostic Report object |
Pre_MapToDiagnostic4_Ext | Data Transform | To be used for extension purpose |
Post_MapToDiagnostic4_Ext | Data Transform | To be used for extension purpose |
Pre_MapToDiagnosticReport4Details_Ext | Data Transform | To be used for extension purpose |
Post_MapToDiagnosticReport4Details_Ext | Data Transform | To be used for extension purpose |
Encounter: GET Encounter list
The FHIR Encounter resource is an interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. The Search interaction enables the client to query for all the Encounters that have been filed for a patient given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: Int-PegaHC-Data-Encounter | ||
Encounter | Service REST | |
D_FHIR4EncounterRead | Data Page | To call connector and map request and response |
EncounterReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToEncounter4Read | Data Transform | To map result data to data page |
MapToEncounter4Details | Data Transform | Map results to PFHC Encounter object |
Pre_MapToEncounter4Read_Ext | Data Transform | To be used for extension |
Post_MapToEncounter4Read_Ext | Data Transform | To be used for extension |
Pre_MapToEncounter4Details_Ext | Data Transform | To be used for extension |
Post_MapToEncounter4Details_Ext | Data Transform | To be used for extension |
Search operation
Key rules
Rule Name | Rule Type | Usage |
Class:PegaHC-Data-Encounter | ||
Encounter | Service REST | |
D_FHIR4Encounter | Data Page | To call connector and map request and response |
EncounterFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToEncounter4 | Data Transform | To map result data to data page |
MapToEncounter4Details | Data Transform | Map results to PFHC Encounter object |
Pre_MapToEncounter4_Ext | Data Transform | To be used for extension |
Post_MapToEncounter4_Ext | Data Transform | To be used for extension |
Pre_MapToEncounter4Details_Ext | Data Transform | To be used for extension |
Post_MapToEncounter4Details_Ext | Data Transform | To be used for extension |
Explanation of Benefits
This resource provides the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Claim | ||
ExplanationOfBenefit | Service REST | |
D_FHIR4EOBRead | Data Page | To call connector and map request and response |
ExplanationOfBenefitReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToEOB4Read | Data Transform | To map result data to data page |
MapToEOB4Details | Data Transform | Map results to PFHC EOB object |
Pre_MapToEOBRead_Ext | Data Transform | To be used for extension |
Post_MapToEOBRead_Ext | Data Transform | To be used for extension |
Pre_MapToEOB4Details_Ext | Data Transform | To be used for extension |
Post_MapToEOB4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Claim | ||
ExplanationOfBenefit | Service REST | |
D_FHIR4EOB | Data Page | To call connector and map request and response |
ExplanationOfBenefitFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToEOB4 | Data Transform | To map result data to data page |
MapToEOB4Details | Data Transform | Map results to PFHC EOB object |
Pre_MapToEOB4_Ext | Data Transform | To be used for extension |
Post_MapToEOB4_Ext | Data Transform | To be used for extension |
Pre_MapToEOB4Details_Ext | Data Transform | To be used for extension |
Post_MapToEOB4Details_Ext | Data Transform | To be used for extension |
EpisodeOfCare: GET EpisodeOfCare details
The FHIR EpisodeOfCare Resource contains information about an association of a Patient with a Healthcare Provider for a period under which related healthcare activities may occur. The Search interaction enables the client to query for all the information about the patient association that have been filed for a patient given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-EpisodeOfCare | ||
EpisodeOfCare | Service REST | |
D_FHIR4EpisodeOfCareRead | Data Page | To call connector and map request and response |
EpisodeOfCareReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToEpisodeOfCare4Read | Data Transform | To map result data to data page |
MapToEpisodeOfCare4Details | Data Transform | Map results to PFHC EpisodeOfCare object |
Pre_MapToEpisodeOfCare4Read_Ext | Data Transform | To be used for extension |
Post_MapToEpisodeOfCare4Read_Ext | Data Transform | To be used for extension |
Pre_MapToEpisodeOfCare4Details_Ext | Data Transform | To be used for extension |
Post_MapToEpisodeOfCare4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class:PegaHC-Data-EpisodeOfCare | ||
EpisodeOfCare | Service REST | |
D_FHIR4EpisodeOfCare | Data Page | To call connector and map request and response |
EpisodeOfCareFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToEpisodeOfCare4 | Data Transform | To map result data to data page |
MapToEpisodeOfCare4Details | Data Transform | Map results to PFHC EpisodeOfCare object |
Pre_MapToEpisodeOfCare4_Ext | Data Transform | To be used for extension |
Post_MapToEpisodeOfCare4_Ext | Data Transform | To be used for extension |
Pre_MapToEpisodeOfCare4Details_Ext | Data Transform | To be used for extension |
Post_MapToEpisodeOfCare4Details_Ext | Data Transform | To be used for extension |
Family Member History: GET FamilyMemberHistory details
The FHIR FamilyMemberHistory resource defines a patient's family history. This resource returns the current status, age, and medical and surgical history of relatives related to a specific patient. The search interaction enables the client to query for family histories based on search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-MedicalHistory | ||
FamilyMemberHistory | Service REST | |
D_FHIR4FamilyHistoryRead | Data Page | To call connector and map request and response |
FamilyMemberHistoryReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToFamilyHistory4Read | Data Transform | To map result data to data page |
MapFamilyMember4Details | Data Transform | Map results to PFHC MedicalHistory object |
Pre_MapToFamilyHistory4Read_Ext | Data Transform | To be used for extension |
Post_MapToFamilyHistory4Read_Ext | Data Transform | To be used for extension |
Pre_MapFamilyMember4Details_Ext | Data Transform | To be used for extension |
Post_MapFamilyMember4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-MedicalHistory | ||
FamilyMemberHistory | Service REST | |
D_FHIR4FamilyHistory | Data Page | To call connector and map request and response |
FamilyMemberHistoryFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToFamilyHistory4 | Data Transform | To map result data to data page |
MapFamilyMember4Details | Data Transform | Map results to PFHC MedicalHistory object |
Pre_MapToFamilyHistory4_Ext | Data Transform | To be used for extension |
Post_MapToFamilyHistory4_Ext | Data Transform | To be used for extension |
Pre_MapFamilyMember4Details_Ext | Data Transform | To be used for extension |
Post_MapFamilyMember4Details_Ext | Data Transform | To be used for extension |
Goal: GET Goal details
The FHIR Goal resource defines objectives for a patient based on a current condition or recent procedure. The Search interaction enables the client to query for the goals of a given patient for a given search parameters
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Goal | ||
Goal | Service REST | |
D_FHIR4GoalRead | Data Page | To call connector and map request and response |
GoalReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToGoal4Read | Data Transform | To map result data to data page |
MapToGoal4Details | Data Transform | Map results to PFHC Goal object |
Pre_MapToGoal4Read_Ext | Data Transform | To be used for extension |
Post_MapToGoal4Read_Ext | Data Transform | To be used for extension |
Pre_MapToGoal4Details_Ext | Data Transform | To be used for extension |
Post_MapToGoal4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Goal | ||
Goal | Service REST | |
D_FHIR4Goal | Data Page | To call connector and map request and response |
GoalFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToGoal | Data Transform | To map result data to data page |
MapToGoal4Details | Data Transform | Map results to PFHC Goal object |
Pre_MapToGoal4_Ext | Data Transform | To be used for extension |
Post_MapToGoal4_Ext | Data Transform | To be used for extension |
Pre_MapToGoal4Details_Ext | Data Transform | To be used for extension |
Post_MapToGoal4Details_Ext | Data Transform | To be used for extension |
ImagingStudy: GET ImagingStudy details
The FHIR ImagingStudy resource provides mappings of its elements to DICOM attributes. The Search interaction enables the client to query for the DICOM attributes of a given patient for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-ImagingStudy | ||
D_FHIR4ImagingStudyRead | Data Page | To call connector and map request and response |
ImagingStudyReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToImagingStudy4Read | Data Transform | To map result data to data page |
MapToImagingStudy4Details | Data Transform | Map results to PFHC ImageStudy object |
Pre_MapToImagingStudy4Read_Ext | Data Transform | To be used for extension |
Post_MapToImagingStudy4Read_Ext | Data Transform | To be used for extension |
Pre_MapToImagingStudy4Details_Ext | Data Transform | To be used for extension |
Post_MapToImagingStudy4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-ImagingStudy | ||
ImagingStudy | Service REST | |
D_FHIR4ImagingStudy | Data Page | To call connector and map request and response |
ImagingStudyFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToImagingStudy4 | Data Transform | To map result data to data page |
MapToImagingStudy4Details | Data Transform | Map results to PFHC ImageStudy object |
Pre_MapToImagingStudy4_Ext | Data Transform | To be used forextension |
Post_MapToImagingStudy4_Ext | Data Transform | To be used forextension |
Pre_MapToImagingStudy4Details_Ext | Data Transform | To be used forextension |
Poat_MapToImagingStudy4Details_Ext | Data Transform | To be used forextension |
Immunization: GET Immunization details
The FHIR Immunization Resource provides information about a patient's immunizations, including the vaccine administered and details regarding the administration. The search interaction enables the client to query for all immunizations documented for a given patient for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Immunization | ||
Immunization | Service REST | |
D_FHIR4ImmunizationRead | Data Page | To call connector and map request and response |
ImmunizationReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToImmunization4Read | Data Transform | To map result data to data page |
MapToImmunizationDetails4 | Data Transform | Map results to PFHC Immunization object |
Pre_MapToImmunization4Read_Ext | Data Transform | To be used for extension |
Post_MapToImmunization4Read_Ext | Data Transform | To be used for extension |
Pre_MapToImmunizationDetails4_Ext | Data Transform | To be used for extension |
Post_MapToImmunizationDetails4_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Immunization | ||
Immunization | Service REST | |
D_FHIR4Immunization | Data Page | To call connector and map request and response |
ImmunizationFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToImmunization4 | Data Transform | To map result data to data page |
MapToImmunizationDetails4 | Data Transform | Map results to PFHC Immunization object |
Pre_MapToImmunization4_Ext | Data Transform | To be used for extension |
Post_MapToImmunization4_Ext | Data Transform | To be used for extension |
Pre_MapToImmunizationDetails4_Ext | Data Transform | To be used for extension |
Post_MapToImmunizationDetails4_Ext | Data Transform | To be used for extension |
Medication
This resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-PatientMedications | ||
Medication | Service REST | |
D_FHIR4MedicationRead | Data Page | To call connector and map request and response |
MedicationReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToMedicationRead4 | Data Transform | To map result data to data page |
MapToMedication4Details | Data Transform | Map results to PFHC PatientMedications object |
Pre_MapToMedicationRead4_Ext | Data Transform | To be used for extension |
Post_MapToMedicationRead4_Ext | Data Transform | To be used for extension |
Pre_MapToMedication4Details | Data Transform | To be used for extension |
Post_MapToMedication4Details | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-PatientMedications | ||
Medication | Service REST | |
D_FHIR4Medication | Data Page | To call connector and map request and response |
MedicationFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToMedication4 | Data Transform | To map result data to data page |
MapToMedication4Details | Data Transform | Map results to PFHC PatientMedications object |
Pre_MapToMedication4_Ext | Data Transform | To be used for extension |
Post_MapToMedication4_Ext | Data Transform | To be used for extension |
Pre_MapToMedication4Details | Data Transform | To be used for extension |
Post_MapToMedication4Details | Data Transform | To be used for extension |
MedicationDispense: GET MedicationDispense details
The FHIR MedicationDispense resource covers the supply of medications to a patient. The search interaction enables the client to query for all dispense information for a given patient for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-PatientMedications | ||
MedicationDispense | Service REST | |
D_Fhir4MedicationDispenseRead | Data Page | To call connector and map request and response |
MedicationDispenseReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToMedicationDispense4Read | Data Transform | To map result data to data page |
MapToMedicationDispense4Details | Data Transform | Map results to PFHC PatientMedications object |
Pre_MapToMedicationDispense4Read_Ext | Data Transform | To be used for extension |
Post_MapToMedicationDispense4Read_Ext | Data Transform | To be used for extension |
Pre_MapToMedicationDispense4Details_Ext | Data Transform | To be used for extension |
Post_MapToMedicationDispense4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
lass: PegaHC-Data-PatientMedications | ||
MedicationDispense | Service REST | |
D_Fhir4MedicationDispense | Data Page | To call connector and map request and response |
MedicationDispenseFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToMedicationDispense4 | Data Transform | To map result data to data page |
MapToMedicationDispense4Details | Data Transform | Map results to PFHC PatientMedications object |
Pre_MapToMedicationDispense4_Ext | Data Transform | To be used for extension |
Post_MapToMedicationDispense4_Ext | Data Transform | To be used for extension |
Pre_MapToMedicationDispense4Details_Ext | Data Transform | To be used for extension |
Post_MapToMedicationDispense4Details_Ext | Data Transform | To be used for extension |
MedicationStatement - GET MedicationStatement details
The FHIR MedicationStatement resource defines detailed information about medications being consumed by a patient. The search interaction enables the client to query for all medications associated with a given patient's medication list for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-PatientMedications | ||
MedicationStatement | Service REST | |
D_FHIR4MedicationStatementRead | Data Page | To call connector and map request and response |
MedicationStatementReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToMedicationStatement4Read | Data Transform | To map result data to data page |
MapToMedicationStatement4Details | Data Transform | Map results to PFHC PatientMedications object |
Pre_MapToMedicationStatement4Read_Ext | Data Transform | To be used for extension |
Post_MapToMedicationStatement4Read_Ext | Data Transform | To be used for extension |
Pre_MapToMedicationStatement4Details_Ext | Data Transform | To be used for extension |
Post_MapToMedicationStatement4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-PatientMedications | ||
MedicationStatement | Service REST | |
D_FHIR4MedicationStatement | Data Page | To call connector and map request and response |
MedicationStatementFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToMedicationStatement4 | Data Transform | To map result data to data page |
MapToMedicationStatement4Details | Data Transform | Map results to PFHC PatientMedications object |
Pre_MapToMedicationStatement4_Ext | Data Transform | To be used for extension |
Post_MapToMedicationStatement4_Ext | Data Transform | To be used for extension |
Pre_MapToMedicationStatement4Details_Ext | Data Transform | To be used for extension |
Post_MapToMedicationStatement4Details_Ext | Data Transform | To be used for extension |
Observation - GET Observations list
The FHIR Observation resource defines information about a measurement or simple assertion made about a patient. The Search interaction enables the client to query for all observations of a specific name or list of names that have been filed for a given patient for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Observation | ||
Observation | Service REST | |
D_FHIR4ObservationRead | Data Page | To call connector and map request and response |
ObservationReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToObservationDetail4Read | Data Transform | To map result data to data page |
MapToObservation4Details | Data Transform | Map results to PFHC Observation object |
Pre_MapToObservationDetail4Read_Ext | Data Transform | To be used for extension |
Post_MapToObservationDetail4Read_Ext | Data Transform | To be used for extension |
Pre_MapToObservation4Details_Ext | Data Transform | To be used for extension |
Post_MapToObservation4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Observation | ||
Observation | Service REST | |
D_FHIR4Observation | Data Page | To call connector and map request and response |
ObservationFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToObservation4 | Data Transform | To map service request data |
MapToObservation4Details | Data Transform | To map result data to data page |
Pre_MapToObservation4_Ext | Data Transform | To be used for extension |
Post_MapToObservation4_Ext | Data Transform | To be used for extension |
Pre_MapToObservation4Details_Ext | Data Transform | To be used for extension |
Post_MapToObservation4Details_Ext | Data Transform | To be used for extension |
Patient: GET Patients list
The FHIR Patient resource defines demographics, care providers, and other administrative information about a person receiving care at a health organization. The search interaction enables the client to query for patients based on a specified set of demographics information for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Party-Member | ||
Patient | Service REST | |
D_FHIR4PatientRead | Data Page | To call connector and map request and response |
PatientReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToPatientDetail4Read | Data Transform | To map result data to data page |
MapToPatient4Details | Data Transform | Map results to PFHC Member object |
Pre_MapToPatinetDetail4Read_Ext | Data Transform | To be used for extension |
Post_MapToPatientDetail4Read_Ext | Data Transform | To be used for extension |
Pre_MapToPatient4Details_Ext | Data Transform | To be used for extension |
Post_MapToPatient4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Party-Member | ||
Patient | Service REST | |
D_FHIR4Patient | Data Page | To call connector and map request and response |
PatientFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToPatients4 | Data Transform | To map result data to data page |
MapToPatient4Details | Data Transform | Map results to PFHC Member object |
Pre_MapToPatients4_Ext | Data Transform | To be used for extension |
Post_MapToPatients4_Ext | Data Transform | To be used for extension |
Pre_MapToPatient4Details_Ext | Data Transform | To be used for extension |
Post_MapToPatient4Details_Ext | Data Transform | To be used for extension |
Practitioner: GET Practitioners list
The FHIR Practitioner resource defines demographics and identifiers for care providers at a health care organization. The search interaction enables the client to query for patients based on a specified set of demographics information for a given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Party-Provider-Practitioner | ||
Practitioner | Service REST | |
D_FHIR4PractitionerRead | Data Page | To call connector and map request and response |
PractitionerReadFHIr4 | Connect REST | Call REST Service using endpoint URL |
MapToPractitionerDetail4Read | Data Transform | To map result data to data page |
MapToPractitioner4Details | Data Transform | Map results to PFHC Practitioner object |
Pre_MapToPractitionerDetail4Read_Ext | Data Transform | To be used for extension |
Post_MapToPractitionerDetail4Read_Ext | Data Transform | To be used for extension |
Pre_MapToPractitioner4Details_Ext | Data Transform | To be used for extension |
Post_MapToPractitioner4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Party-Provider-Practitioner | ||
Practitioner | Service REST | |
D_FHIR4Practitioner | Data Page | To call connector and map request and response |
PractitionerFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToPractitioner4 | Data Transform | To map service request data |
MapToPractitioner4Details | Data Transform | To map result data to data page |
Pre_ MapToPractitioner4_Ext | Data Transform | To be used for extension |
Post_ MapToPractitioner4_Ext | Data Transform | To be used for extension |
Pre_MapToPractitioner4Details_Ext | Data Transform | To be used for extension |
Post_MapToPractitioner4Details_Ext | Data Transform | To be used for extension |
PractitonerRole - GET Practitioner role details
Practitioner Role covers the recording of the location and types of services that Practitioners can provide for an organization
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Party-Provider | ||
PractitionerRole | Service REST | |
D_FHIR4PractitionerRoleRead | Data Page | To call connector and map request and response |
PractitionerRoleReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToPractitionerRoleDetail4Read | Data Transform | To map result data to data page |
MapToPractitionerRole4Details | Data Transform | Map to PFHC object |
Pre_MapToPractitionerRoleDetail4Read_Ext | Data Transform | To be used for extension |
Post_MapToPractitionerRoleDetail4Read_Ext | Data Transform | To be used for extension |
Pre_MapToPractitionerRole4Details_Ext | Data Transform | To be used for extension |
Post_MapToPractitionerRole4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Party-Provider | ||
PractitionerRole | Service REST | |
D_FHIR4PractitionerRole | Data Page | To call connector and map request and response |
PractitionerRoleFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToPractitionerRole4 | Data Transform | To map result data to data page |
MapToPractitionerRole4Details | Data Transform | Map to PFHC object |
Pre_MapToPractitionerRole4_Ext | Data Transform | To be used for extension |
Post_MapToPractitionerRole4_Ext | Data Transform | To be used for extension |
Pre_MapToPractitionerRole4Details_Ext | Data Transform | To be used for extension |
Post_MapToPractitionerRole4Details_Ext | Data Transform | To be used for extension |
Procedure - GET Procedure details
The FHIR Procedure resource defines an activity performed on or with a patient as part of the provision of care. The Search interaction enables the client to query for all of a patient's completed procedures by providing search parameters.
Read operation
parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-ClinicalProcedure | ||
Procedure | Service REST | |
D_FHIR4ClinicalProcedureRead | Data Page | To call connector and map request and response |
ProcedureReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToClinicalProcedure4Read | Data Transform | To map result data to data page |
MapToClinicalProcedure4Details | Data Transform | Map results to PFHC ClinicalProcedure object |
Pre_MapToClinicalProcedure4Read_Ext | Data Transform | To be used for extension |
Post_MapToClinicalProcedure4Read_Ext | Data Transform | To be used for extension |
Pre_MapToClinicalProcedure4Details_Ext | Data Transform | To be used for extension |
Post_MapToClinicalProcedure4Details_Ext | Data Transform | To be used for extension |
Search operation
parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-ClinicalProcedure | ||
Procedure | Service REST | |
D_FHIR4ClinicalProcedure | Data Page | To call connector and map request and response |
ProcedureFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToClinicalProcedure4 | Data Transform | To map result data to data page |
MapToClinicalProcedure4Details | Data Transform | Map results to PFHC ClinicalProcedure object |
Pre_MapToClinicalProcedure4_Ext | Data Transform | To be used for extension |
Post_MapToClinicalProcedure4_Ext | Data Transform | To be used for extension |
Pre_MapToClinicalProcedure4Details_Ext | Data Transform | To be used for extension |
Post_MapToClinicalProcedure4Details_Ext | Data Transform | To be used for extension |
Schedule - GET Schedule details
The FHIR Schedule resource defines a group of schedulable "slots" that can ultimately be used to book an appointment with a provider. The search interaction enables the client, eventually, to receive information about schedulable slots for a given provider and/or visit type given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Goal | ||
Schedule | Service REST | |
D_FHIR4ScheduleRead | Data Page | To call connector and map request and response |
ScheduleReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToSchedule4Read | Data Transform | To map result data to data page |
MapToSchedule4Details | Data Transform | Map results to PFHC Goal object |
Pre_MapToSchedule4Read_Ext | Data Transform | To be used for extension |
Post_MapToSchedule4Read_Ext | Data Transform | To be used for extension |
Pre_MapToSchedule4Details_Ext | Data Transform | To be used for extension |
Post_MapToSchedule4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-Goal | ||
Schedule | Service REST | |
D_FHIR4Schedule | Data Page | To call connector and map request and response |
ScheduleFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToSchedule4 | Data Transform | To map result data to data page |
MapToSchedule4Details | Data Transform | Map results to PFHC Goal object |
Pre_MapToSchedule4_Ext | Data Transform | To be used for extension |
Post_MapToSchedule4_Ext | Data Transform | To be used for extension |
Pre_MapToSchedule4Details_Ext | Data Transform | To be used for extension |
Post_MapToSchedule4Details_Ext | Data Transform | To be used for extension |
Slot - GET Slot details
The FHIR Slot resource defines a time during which a provider is available to see patients. The search interaction returns the slots contained within the provided schedule given search parameters.
Read operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-AppointmentSchedule | ||
Slot | Service REST | |
D_FHIR4SlotRead | Data Page | To call connector and map request and response |
SlotReadFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToSlot4Read | Data Transform | To map result data to data page |
MapToSlot4Details | Data Transform | Map results to PFHC AppointmentSchedule object |
Pre_MapToSlot4Read_Ext | Data Transform | To be used for extension |
Post_MapToSlot4Read_Ext | Data Transform | To be used for extension |
Pre_MapToSlot4Details_Ext | Data Transform | To be used for extension |
Post_MapToSlot4Details_Ext | Data Transform | To be used for extension |
Search operation
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: PegaHC-Data-AppointmentSchedule | ||
Slot | Service REST | |
D_FHIR4Slot | Data Page | To call connector and map request and response |
SlotFHIR4 | Connect REST | Call REST Service using endpoint URL |
MapToSlot4 | Data Transform | To map result data to data page |
MapToSlot4Details | Data Transform | Map results to PFHC AppointmentSchedule object |
Pre_ MapToSlot4_Ext | Data Transform | To be used for extension |
Post_ MapToSlot4_Ext | Data Transform | To be used for extension |
Pre_MapToSlot4Details_Ext | Data Transform | To be used for extension |
Post_MapToSlot4Details_Ext | Data Transform | To be used for extension |
Testing
If you want to run a simple test to ensure the APIs work against the FHIR®© server:
- 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 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 Designer Studio > Data Model > View external data entities.
- Expand the Bundle API Data Type and click on the D_GetFHIR4Patient Data Page under Member category link to open it.
- Click Run from the Actions menu of the Data Page rule.
- Click Run on the Run Data Page screen.
- Assuming that the sample End Point URL configured for the FHIR test server is still active and the server is available, the API returns the response.
- Navigate through the Results section to view the data retrieved from the FHIR®© Server and mapped to the FHIR data model for the Patient Resource.
- Alternatively, you may run the Test Case associated with the Data Page to test the API.
Configuring a new API for a new FHIR Resource
The connector and data model are generated by using the REST Connector wizard.
- Log into your application using the administrator login.
- On the Dev Studio menu, navigate to Integration > Connectors > Create REST Integration.
- Configure the System details. Provide the FHIR end-point URL of desired
resource as shown below.
- Configure the Resource path, Query String parameters, and authentication as necessary.
- In the Resource Methods step, specify the Resource name and select the desired
Method, such as GET or POST.
- On Integration layer provide the Parent Class name and Connector name as shown
below.
- Skip the Data Layer.
You will see the following Final screen after generating Data Model:
The Generated Data Model and API infrastructure looks as shown below:
- Extend the LoadFHIR4Settings DataTransform rule in your application layer and specify the end-point URLs of your source systems.
- Analyze PegaHC-Data- classes to identify existing logical data class to map the response data and/or create a new data class as needed.
- Create the appropriate Response Data Transform rules to map the response data to the appropriate Data class identified/created above. See MapToMembers4 and MapToMember4Details for reference.
- Create an appropriate Data Page (see example D_FHIR4Member) to call the configured REST service and the appropriate request and response Data Transform rules.
Extending the mapping of an existing FHIR Resource
The mapping of the API response data to logical data classes in Pega Foundation for Healthcare is configured using appropriate data transform rules as mentioned in the Key Rules for each Resource. The current mapping accounts for majority of data needed for business processing. To extend the mapping to include a missing attribute, copy and extend the pre or post data transform rules in your application layer depending on the need.
You may refer ‘MapToPatients4’ mapping datatransform.
FHIR API services overview
The Pega Foundation for Healthcare publishes three FHIR service APIs to support the 2021 CMS interoperability mandate for enabling patient access to claims and encounter data. Those APIs, Patient, Coverage and Explanation of Benefits (EOB) establish the Foundation as the endpoint URL, allowing the exchange of data using GET capability.
The Pega Healthcare FHIR services enable you to integrate your Pega applications with external systems to request, receive, and send data. You can call any of the Pega Healthcare FHIR services by using standard HTTP methods (for example: GET, POST, or PUT). The supported APIs provides a standard set of services and requests that include access to data pages for commonly referenced objects in healthcare applications e.g. Patient, Coverage and Explanation of Benefits. These APIs enable rapid deployment of your Pega’s healthcare applications.
Accessing Pega Healthcare FHIR APIs
Pega offers online help documentation on the healthcare APIs. You can access the Pega Healthcare FHIR services from the API landing page.
This API landing page can be accessed via three different ways:
- In Admin Studio, click Resources> APIs> Pega API service package.
- In App Studio, click Channels> API> Pega API service package.
- In Dev Studio, click Application name> Channels and interfaces> API> Pega API service package (OR) click the Info icon to open the Resources menu> Pega API> Pega API service package.
From API landing page, select ‘FHIR API’ service package and the related services will be shown on the screen.
Using the above links, you can:
- View the JSON data model for each published resource.
- List the parameters used for each resource.
- Directly test the API by clicking the Try it out! and viewing the actual request URL, response body, response code, and response headers.
Published Healthcare FHIR API Services
Business request APIs
- Coverage
- Read
- Search
- Patient
- Read
- Search
- Explanation of Benefit
- Read
- Search
API integration classes
The Healthcare FHIR API infrastructure provides an integration class for each published API resource. This class defines the data model used in mapping the response data returned via API call. The classes are configured as Int-Fhir401-xxxx as shown below.
Business service APIs
FHIR API - service package rule
The key service package rule is called FHIR API. It lists all the REST services published in this release.
REST service method
The Healthcare API provides a mechanism for an external system to call the Pega Healthcare API REST services.
Rule Name | Rule Type | Usage |
<Resource> Example: Payers | Service REST | REST service rule that identifies the path, parameters, and methods |
Get<Resource>API Example: GetPayerAPI | Activity | Method in REST service to get resource details |
MapFrom<Resource> Example: MapFromPayers | Data Transform | Map results from PFHC resource to API Integration object |
Service REST rule
Each Resource published in the Healthcare FHIR API has a pre-configured REST Service rule that identifies the key properties including the path and parameters as well as all the methods configured for the Resource. Let’s look at an example below for the Patient API.
Resource and query parameters
The Resource and Query parameters configured on the REST Service rule are used to form and call the appropriate endpoint system URL. In this example, the patient ID is passed as resource parameter, which will convert endpoint URL as shown below:
http://<<hostname>>:9080/prweb/api/fhirapi/v1/Patient/{ID}
The Methods tab of the rule defines any of the methods - GET, PUT, POST defined for the Resource along with the parameters for each method.
Service activity rule
Each method defined on the Resource REST Service rule has an activity rule that kicks-off the process when the Service Method is executed. The requested data is retrieved using the endpoint URL of the source system using the parameters that were passed in the Method.
The data that is returned from the source system is mapped to the Integration class for the Resource as shown earlier. Results of this request will be stored in Param.Response and passed to data page.
Mapping data transform rule
The Activity defined in the Service Method calls a mapping Data Transform rule to map the returned data to the appropriate data page.
HTTP status codes
Success codes
HTTP Status Code | Description |
200 | Success(OK) |
201 | Created |
204 | No content |
Error codes
HTTP Status Code | Description |
400 | Bad request |
401 | Unauthorized |
403 | Forbidden |
404 | Not found |
412 | Precondition failed |
500 | Internal Error (Server Error) |
Healthcare FHIR API key
Patient - Read
This service rule takes ID (Patient ID) as input parameter and returns the Patient details in response. ID is a required parameter here.
URL format
GET https://[hostname:port]/prweb/api/fhirapi/v1/Patient/{ID}
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-PatientAPI | ||
patient | Service REST | |
GetPatientRead | Activity | Method in REST service to get patient |
MapFromPatient | Data Transform | Map results from PFHC Member (Patient) to API Integration object |
Pre_MapFromPatient_EXT | Data Transform | Pre mapping data transform |
Post_MapFromPatient_EXT | Data Transform | Post mapping data transform |
Patient - Search
URL format
POST https://[hostname:port]/prweb/api/fhirapi/v1/Patient
Parameters
This service rule has multiple input parameter and returns the Patient details in response. If we are giving ID to this service, we get specific patient details. Otherwise all the parameters return results by applying OR logic. If no parameter is mentioned, we get all the patients in a list.
Key rules
Rule Name | Rule Type | Usage |
patient01122a97dca927210827560cb7d76af8 | Service REST | |
GetPatientSearch | Activity | Method in REST service to get patient details |
MapFromPatient | Data Transform | Map results from PFHC Member (Patient) to API Integration object |
Pre_MapFromPatient_EXT | Data Transform | Pre mapping data transform |
Post_MapFromPatient_EXT | Data Transform | Post mapping data transform |
Coverage - Read
Coverage API takes ID or Patient ID as required field to provide details. Below are key rules:
URL format
GET https://[hostname:port]/prweb/api/fhirapi/v1/Coverage/{ID}
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-CoverageAPI | ||
coverage_varc5a964023f10a197fee699d0e9f2b68e | Service REST | |
GetCoverageRead | Activity | Method in REST service to get coverage related details |
MapFromCoverage | Data Transform | Map results from PFHC Policy to API Integration object |
Pre_MapFromCoverage_EXT | Data Transform | Pre mapping data transform |
Post_MapFromCoverage_EXT | Data Transform | Post mapping data transform |
Coverage - Search
Coverage search API takes ID and BeneficiaryID as parameter to give details. Either one of the above-mentioned parameters is compulsory.
Below are key rules:
URL format
GET https://[hostname:port]/prweb/api/fhirapi/v1/Coverage
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-CoverageAPI | ||
coverage9841bdc50c4226cb6ec5db7649424 9e6 | Service REST | |
GetCoverageSearch | Activity | Method in REST service to get coverage related details |
MapFromCoverage | Data Transform | Map results from PFHC Policy to API Integration object |
Pre_MapFromCoverage_EXT | Data Transform | Pre mapping data transform |
Post_MapFromCoverage_EXT | Data Transform | Post mapping data transform |
Explanation of Benefit - Read
Explanation of benefit API takes ID (Patient ID) and Claim ID as the parameter to provide policy details. Both are required parameters here. And Patient Id should be related to Claim ID.
Below are key rules:
URL format
GET https://[hostname:port]/prweb/api/fhirapi/v1/ExplanationOfBenefit/{ID}/{Claim}
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-ExplanationOfBenefitAPI | ||
explanationofbenefit_var_var6ff11ae7c7f089 4bff63db3a75686cc8 | Service REST | |
GetExplanationOfBenefitRead | Activity | Method in REST service to get details related to explanation of benefit. |
MapFromExplanationOfBenefit | Data Transform | Map results from PFHC Polciy to API Integration object |
Pre_MapFromEOB_EXT | Data Transform | Pre mapping data transform |
Post_MapFromEOB_EXT | Data Transform | Post mapping data transform |
Explanation of Benefit - search
Explanation of benefit search API takes ID (Patient ID), Claim ID and Created as the parameter to provide policy details.
Below are key rules:
URL format
https://[hostname:port]/prweb/api/fhirapi/v1/ExplanationOfBenefit
Parameters
Key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-ExplanationOfBenefitAPI | ||
explanationofbenefitf74ff796469fe6c8d5e36 76e4411d79c | Service REST | |
GetExplanationOfBenefitRead | Activity | Method in REST service to get details related to explanation of benefit. |
MapFromExplanationOfBenefit | Data Transform | Map results from PFHC Policy to API Integration object |
Pre_MapFromEOB_EXT | Data Transform | Pre mapping data transform |
Post_MapFromEOB_EXT | Data Transform | Post mapping data transform |
Testing the services
- You may test the above services by running the REST service rule from Actions menu.
- Or you may use the pre-configured Data pages to access these services. Below mentioned are the services with data pages and some key rules.
Patient (read) data page key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-PatientAPI | ||
D_GetFHIR4PatientServiceRead Parameters: ID | Data Page | To call connector |
PatientFHIR4ServiceRead | Connect REST | Call REST Service using endpoint URL |
Patient (search) data page key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-PatientAPI | ||
D_GetFHIR4PatientService Parameters: ID, name, given, gender, family,birthdate,address, addresscIty, addressState, addressPostalCode, AaddressCountry,phone, language, generalPractitioner, email | Data Page | To call connector |
PatientFHIR4Service | Connect REST | Call REST Service using endpoint URL |
Coverage (read) data page key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-CoverageAPI | ||
D_GetFHIR4CoverageServiceRead Parameters: ID | Data Page | To call connector |
CoverageFHIR4ServiceRead | Connect REST | Call REST Service using endpoint URL |
Coverage (search) data page key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-CoverageAPI | ||
D_GetFHIR4CoverageService Parameters: ID, BeneficiaryID | Data Page | To call connector |
CoverageFHIR4Service | Connect REST | Call REST Service using endpoint URL |
Explanation of read (read) data page key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-ExplanationOfBenefitAPI | ||
D_GetFHIR4EOBServiceRead Parameters: ID, ClaimID | Data Page | To call connector |
EOBFHIR4ServiceRead | Connect REST | Call REST Service using endpoint URL |
Explanation of read (search) data page key rules
Rule Name | Rule Type | Usage |
Class: Int-Fhir401-ExplanationOfBenefitAPI | ||
D_GetFHIR4EOBService Parameters: ID, ClaimID, Created | Data Page | To call connector |
EOBFHIR4Service | Connect REST | Call REST Service using endpoint URL |
- You may invoke the services from the external tools like Postman.
- From API landing pages.
OAuth authentication
You can refer to configure OAuth 2.0 authentication profile.
OAuth configuration for FHIR/CMS services
Ensure TLS is enabled for the host/server from which the services are to be accessed.
After completion of installation:
- Login as administrator to Dev Studio.
- Go to Records > Security > OAuth2.0 client registration, to
create OAuth2.0 client registration instance.
Below are the screenshots showing the creation of sample OAuth2.0 client registration.
- Click on view and download credential
button to view client secret and click on Download
credentials button to get the credentials as text file.
In the supported grant types, select Authorization code and provide appropriate redirect URI’s.
Remaining configuration.
Test PFHC FHIR services from API landing page with OAuth
Select FHIR API service package from API landing page and click on Authorize.
In the available authorization pop up, scroll to AUTHCODE section and input client ID and client secret values download while creating OAuth2.0 client registration instance. Clicking on Authorize button, will be redirect for login in a new tab. (login using any operator with access group PegaHC: Administrators).
On successful login, you should see Logout button in place of earlier Authorize button as shown below.
Now, close the popup and proceed to try any of the API’s.
Test PFHC FHIR services using Data page and Authentication profile
To access OAuth 2.0 enabled FHIR servers via data page + rest connector combination, create an authentication profile with client and client secret downloaded from OAuth 2.0 client registration.
Below screenshots shows sample Authentication profile corresponding to OAuth 2.0 client registration.
Once the authentication profile is created, open connected apps landing page from Configure->Integration->Connected Apps.
Click on Connect button for the CMS Authentication profile. This will pop up a new window asking for login. login using any operator with access group PegaHC: Administrators).
On successful login, you should see Disconnect button in place of Connect button as shown below.
Ensure that localhostname DSS is updated with right value
For testing Coverage search service, Open D_GetFHIR4PatientService data page and ensure its connector has the correct authentication profile.
Now, run D_GetFHIR4CoverageService to view the results.
Previous topic Pega Foundation for Healthcare technical specifications Next topic Pega Foundation for Healthcare 8.7 common objects API technical specification guide