Skip to main content


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

FHIR API technical specification guide

Updated on October 19, 2021

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:

ResourceDescription
Allergy IntoleranceRisk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.
BinaryA 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 PlanDescribes 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.
CoverageThis 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.
DeviceThis 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 ReportThe 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 ReferenceDocument 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.
EncounterAn 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 BenefitsThis 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 CareAn 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 HistorySignificant health events and conditions for a person related to the patient relevant in the context of care for the patient.
GoalDescribes 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 StudyRepresentation 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.
ImmunizationDescribes 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.
MedicationThis resource is primarily used for the identification and definition of a medication. It covers the ingredients and the packaging for a medication.
Medication DispenseIndicates 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 StatementA 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.
ObservationMeasurements and simple assertions made about a patient, device, or other subject.
PatientDemographics and other administrative information about an individual or animal receiving care or other health-related services.
PractitionerA person who is directly or indirectly involved in the provisioning of healthcare.
Practitioner RolePractitioner Role covers the recording of the location and types of services that Practitioners are able to provide for an organization
ProcedureAn 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.
ScheduleA container for slot(s) of time that may be available for booking appointments.
SlotA 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:

Note: All the APIs listed above have been tested on the above open source FHIR test servers as available. The search parameters are as available at the time of the release. Pega is not responsible for any changes that may be introduced on the open source servers.

PFHC FHIR application bundle

Note: The FHIR APIs are configured and packaged as the /FHIR®© Application bundle on the PFHC media. Ensure that your administrator has installed the PegaHCFHIR®© application bundle in your application environment to access the capability documented below.

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 NameRule TypeUsage
Class: PegaHC-Data-Allergies
AllergiesService REST
D_FHIR4AllergyReadData PageTo call connector and map request and response
AllergiesReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToAllergy4ReadData TransformTo map result data to data page
MapToAllergy4DetailsData TransformMap results to PFHC Allergy object
Pre_MapToAllergy4Read_ExtData TransformTo be used for extension purpose
Post_MapToAllergy4Read_ExtData TransformTo be used for extension purpose
Pre_MapToAllergy4Details_ExtData TransformTo be used for extension purpose
Post_MapToAllergy4Details_ExtData TransformTo be used for extension purpose

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Allergies
AllergiesService REST
D_FHIR4AllergyData PageTo call connector and map request and response
AllergiesFHIR4Connect RESTCall REST Service using endpoint URL
MapToAllergy4Data TransformTo map result data to data page
MapToAllergy4DetailsData TransformMap results to PFHC Allergy object
Pre_MapToAllergy4_ExtData TransformTo be used for extension
Post_MapToAllergy4_ExtData TransformTo be used for extension
Pre_MapToAllergy4Details_ExtData TransformTo be used for extension
Post_MapToAllergy4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-CarePlan
CarePlanService REST
D_FHIR4CarePlanReadData PageTo call connector and map request and response
CarePlanReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToCarePlan4ReadData TransformTo map result data to data page
MapToCarePlan4DetailsData TransformMap results to PFHC Care Plan object
Pre_MapToCarePlan4Read_ExtData TransformTo be used for extension
Post_MapToCarePlan4Read_ExtData TransformTo be used for extension
Pre_MapToCarePlan4Details_ExtData TransformTo be used for extension
Post_MapToCarePlan4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-CarePlan
CarePlanService REST
D_FHIR4CarePlanData PageTo call connector and map request and response
CarePlanFHIR4Connect RESTCall REST Service using endpoint URL
MapToCarePlan4Data TransformTo map result data to data page
MapToCarePlan4DetailsData TransformMap results to PFHC Care Plan object
Pre_MapToCarePlan4_ExtData TransformTo be used for extension
Post_MapToCarePlan4_ExtData TransformTo be used for extension
Pre_MapToCarePlan4Details_ExtData TransformTo be used for extension
Post_MapToCarePlan4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-ClinicalCondition
ConditionService REST
D_FHIR4ClinicalConditionReadData PageTo call connector and map request and response
ConditionReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToClinicalCondition4ReadData TransformTo map result data to data page
MapToClinicalCondition4DetailsData TransformMap results to PFHC Clinical Condition object
Pre_MapToClinicalCondition4Read_ExtData TransformTo be used for extension
Post_MapToClinicalCondition4Read_ExtData TransformTo be used for extension
Pre_MapToClinicalCondition4Details_ExtData TransformTo be used for extension
Post_MapToClinicalCondition4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-ClinicalCondition
ConditionService REST
D_FHIR4ClinicalConditionData PageTo call connector and map request and response
ConditionFHIR4Connect RESTCall REST Service using endpoint URL
MapToClinicalCondition4Data TransformTo map result data to data page
MapToClinicalCondition4DetailsData TransformMap results to PFHC Clinical Condition object
Pre_MapToClinicalCondition4_ExtData TransformTo be used for extension
Post_MapToClinicalCondition4_ExtData TransformTo be used for extension
Pre_MapToClinicalCondition4Details_ExtData TransformTo be used for extension
Post_MapToClinicalCondition4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Policy
CoverageService REST
D_FHIR4CoverageReadData PageTo call connector and map request and response
CoverageReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToCoverage4ReadData TransformTo map result data to data page
MapToCoverage4DetailsData TransformMap results to PFHC Coverage object
Pre_MapToCoverage4Read_ExtData TransformTo be used for extension
Post_MapToCoverage4Read_ExtData TransformTo be used for extension
Pre_MapToCoverage4Details_ExtData TransformTo be used for extension
Post_MapToCoverage4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Policy
CoverageService REST
D_FHIR4CoverageData PageTo call connector and map request and response
CoverageFHIR4Connect RESTCall REST Service using endpoint URL
MapToCoverage4Data TransformTo map result data to data page
MapToCoverage4DetailsData TransformMap results to PFHC Coverage object
Pre_MapToCoverage4_ExtData TransformTo be used for extension
Post_MapToCoverage4_ExtData TransformTo be used for extension

Pre_MapToCoverage4Details_Ext

Data TransformTo be used for extension
Post_MapToCoverage4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Device
DeviceService REST
D_FHIR4DeviceReadData PageTo call connector and map request and response
DeviceReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToDevice4ReadData TransformTo map result data to data page
MapToDevice4DetailsData TransformMap results to PFHC Device object
Pre_MapToDevice4Read_ExtData TransformTo be used for extension
Post_MapToDevice4Read_ExtData TransformTo be used for extension
Pre_MapToDevice4Details_ExtData TransformTo be used for extension
Post_MapToDevice4Details_ExtPData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Device
DeviceService REST
D_FHIR4DeviceData PageTo call connector and map request and response
DeviceFHIR4Connect RESTCall REST Service using endpoint URL
MapToDevice4Data TransformTo map result data to data page
Pre_MapToDevice4_ExtData TransformTo be used for extension
Post_MapToDevice4_ExtData TransformTo be used for extension
Pre_MapToDevice4Details_ExtData TransformTo be used for extension
Post_MapToDevice4Details_ExtData TransformTo be used for extension
MapToDevice4DetailsData TransformMap 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 NameRule TypeUsage
Class: PegaHC-Data-DiagnosticReport
DiagnosticReportService REST
D_FHIR4DiagnosticReportReadData PageTo call connector and map request and response
DiagnosticReportReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToDiagnosticReport4ReadData TransformTo map result data to data page
MapToDiagnosticReport4DetailsData TransformMap results to PFHC Diagnostic Report object
Pre_MapToDiagnosticReport4Read_ExtData TransformTo be used for extension purpose
Post_MapToDiagnosticReport4Read_ExtData TransformTo be used for extension purpose
Pre_MapToDiagnosticReport4Details_ExtData TransformTo be used for extension purpose
Post_MapToDiagnosticReport4Details_ExtData TransformTo be used for extension purpose

Search operation

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-DiagnosticReport
DiagnosticReportService REST
D_FHIR4DiagnosticReportData PageTo call connector and map request and response
DiagnosticReportFHIR4Connect RESTCall REST Service using endpoint URL
MapToDiagnosticReport4Data TransformTo map result data to data page
MapToDiagnosticReport4DetailsData TransformMap results to HCIF Diagnostic Report object
Pre_MapToDiagnostic4_ExtData TransformTo be used for extension purpose
Post_MapToDiagnostic4_ExtData TransformTo be used for extension purpose
Pre_MapToDiagnosticReport4Details_ExtData TransformTo be used for extension purpose
Post_MapToDiagnosticReport4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: Int-PegaHC-Data-Encounter
EncounterService REST
D_FHIR4EncounterReadData PageTo call connector and map request and response
EncounterReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToEncounter4ReadData TransformTo map result data to data page
MapToEncounter4DetailsData TransformMap results to PFHC Encounter object
Pre_MapToEncounter4Read_ExtData TransformTo be used for extension
Post_MapToEncounter4Read_ExtData TransformTo be used for extension
Pre_MapToEncounter4Details_ExtData TransformTo be used for extension
Post_MapToEncounter4Details_ExtData TransformTo be used for extension

Search operation

Key rules

Rule NameRule TypeUsage
Class:PegaHC-Data-Encounter
EncounterService REST
D_FHIR4EncounterData PageTo call connector and map request and response
EncounterFHIR4Connect RESTCall REST Service using endpoint URL
MapToEncounter4Data TransformTo map result data to data page
MapToEncounter4DetailsData TransformMap results to PFHC Encounter object
Pre_MapToEncounter4_ExtData TransformTo be used for extension
Post_MapToEncounter4_ExtData TransformTo be used for extension
Pre_MapToEncounter4Details_ExtData TransformTo be used for extension
Post_MapToEncounter4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Claim
ExplanationOfBenefitService REST
D_FHIR4EOBReadData PageTo call connector and map request and response
ExplanationOfBenefitReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToEOB4ReadData TransformTo map result data to data page
MapToEOB4DetailsData TransformMap results to PFHC EOB object
Pre_MapToEOBRead_ExtData TransformTo be used for extension
Post_MapToEOBRead_ExtData TransformTo be used for extension
Pre_MapToEOB4Details_Ext Data TransformTo be used for extension
Post_MapToEOB4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Claim
ExplanationOfBenefitService REST
D_FHIR4EOBData PageTo call connector and map request and response
ExplanationOfBenefitFHIR4Connect RESTCall REST Service using endpoint URL
MapToEOB4Data TransformTo map result data to data page
MapToEOB4DetailsData TransformMap results to PFHC EOB object
Pre_MapToEOB4_ExtData TransformTo be used for extension
Post_MapToEOB4_ExtData TransformTo be used for extension
Pre_MapToEOB4Details_ExtData TransformTo be used for extension
Post_MapToEOB4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-EpisodeOfCare
EpisodeOfCareService REST
D_FHIR4EpisodeOfCareReadData PageTo call connector and map request and response
EpisodeOfCareReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToEpisodeOfCare4ReadData TransformTo map result data to data page
MapToEpisodeOfCare4DetailsData TransformMap results to PFHC EpisodeOfCare object
Pre_MapToEpisodeOfCare4Read_ExtData TransformTo be used for extension
Post_MapToEpisodeOfCare4Read_ExtData TransformTo be used for extension
Pre_MapToEpisodeOfCare4Details_ExtData TransformTo be used for extension
Post_MapToEpisodeOfCare4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class:PegaHC-Data-EpisodeOfCare
EpisodeOfCareService REST
D_FHIR4EpisodeOfCareData PageTo call connector and map request and response
EpisodeOfCareFHIR4Connect RESTCall REST Service using endpoint URL
MapToEpisodeOfCare4Data TransformTo map result data to data page
MapToEpisodeOfCare4DetailsData TransformMap results to PFHC EpisodeOfCare object
Pre_MapToEpisodeOfCare4_ExtData TransformTo be used for extension
Post_MapToEpisodeOfCare4_ExtData TransformTo be used for extension
Pre_MapToEpisodeOfCare4Details_ExtData TransformTo be used for extension
Post_MapToEpisodeOfCare4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-MedicalHistory
FamilyMemberHistoryService REST
D_FHIR4FamilyHistoryReadData PageTo call connector and map request and response
FamilyMemberHistoryReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToFamilyHistory4ReadData TransformTo map result data to data page
MapFamilyMember4DetailsData TransformMap results to PFHC MedicalHistory object
Pre_MapToFamilyHistory4Read_ExtData TransformTo be used for extension
Post_MapToFamilyHistory4Read_ExtData TransformTo be used for extension
Pre_MapFamilyMember4Details_ExtData TransformTo be used for extension
Post_MapFamilyMember4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-MedicalHistory
FamilyMemberHistoryService REST
D_FHIR4FamilyHistoryData PageTo call connector and map request and response
FamilyMemberHistoryFHIR4Connect RESTCall REST Service using endpoint URL
MapToFamilyHistory4Data TransformTo map result data to data page
MapFamilyMember4DetailsData TransformMap results to PFHC MedicalHistory object
Pre_MapToFamilyHistory4_ExtData TransformTo be used for extension
Post_MapToFamilyHistory4_ExtData TransformTo be used for extension
Pre_MapFamilyMember4Details_ExtData TransformTo be used for extension
Post_MapFamilyMember4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Goal
GoalService REST
D_FHIR4GoalReadData PageTo call connector and map request and response
GoalReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToGoal4ReadData TransformTo map result data to data page
MapToGoal4DetailsData TransformMap results to PFHC Goal object
Pre_MapToGoal4Read_ExtData TransformTo be used for extension
Post_MapToGoal4Read_ExtData TransformTo be used for extension
Pre_MapToGoal4Details_ExtData TransformTo be used for extension
Post_MapToGoal4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Goal
GoalService REST
D_FHIR4GoalData PageTo call connector and map request and response
GoalFHIR4Connect RESTCall REST Service using endpoint URL
MapToGoalData TransformTo map result data to data page
MapToGoal4DetailsData TransformMap results to PFHC Goal object
Pre_MapToGoal4_ExtData TransformTo be used for extension
Post_MapToGoal4_ExtData TransformTo be used for extension
Pre_MapToGoal4Details_ExtData TransformTo be used for extension
Post_MapToGoal4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-ImagingStudy
D_FHIR4ImagingStudyReadData PageTo call connector and map request and response
ImagingStudyReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToImagingStudy4ReadData TransformTo map result data to data page
MapToImagingStudy4DetailsData TransformMap results to PFHC ImageStudy object
Pre_MapToImagingStudy4Read_ExtData TransformTo be used for extension
Post_MapToImagingStudy4Read_ExtData TransformTo be used for extension
Pre_MapToImagingStudy4Details_ExtData TransformTo be used for extension
Post_MapToImagingStudy4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-ImagingStudy
ImagingStudyService REST
D_FHIR4ImagingStudyData PageTo call connector and map request and response
ImagingStudyFHIR4Connect RESTCall REST Service using endpoint URL
MapToImagingStudy4Data TransformTo map result data to data page
MapToImagingStudy4DetailsData TransformMap results to PFHC ImageStudy object
Pre_MapToImagingStudy4_ExtData TransformTo be used forextension
Post_MapToImagingStudy4_ExtData TransformTo be used forextension
Pre_MapToImagingStudy4Details_ExtData TransformTo be used forextension
Poat_MapToImagingStudy4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Immunization
ImmunizationService REST
D_FHIR4ImmunizationReadData PageTo call connector and map request and response
ImmunizationReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToImmunization4ReadData TransformTo map result data to data page
MapToImmunizationDetails4Data TransformMap results to PFHC Immunization object
Pre_MapToImmunization4Read_ExtData TransformTo be used for extension
Post_MapToImmunization4Read_ExtData TransformTo be used for extension
Pre_MapToImmunizationDetails4_ExtData TransformTo be used for extension
Post_MapToImmunizationDetails4_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Immunization
ImmunizationService REST
D_FHIR4ImmunizationData PageTo call connector and map request and response
ImmunizationFHIR4Connect RESTCall REST Service using endpoint URL
MapToImmunization4Data TransformTo map result data to data page
MapToImmunizationDetails4Data TransformMap results to PFHC Immunization object
Pre_MapToImmunization4_ExtData TransformTo be used for extension
Post_MapToImmunization4_ExtData TransformTo be used for extension
Pre_MapToImmunizationDetails4_ExtData TransformTo be used for extension
Post_MapToImmunizationDetails4_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-PatientMedications
MedicationService REST
D_FHIR4MedicationReadData PageTo call connector and map request and response
MedicationReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToMedicationRead4Data TransformTo map result data to data page
MapToMedication4DetailsData TransformMap results to PFHC PatientMedications object
Pre_MapToMedicationRead4_ExtData TransformTo be used for extension
Post_MapToMedicationRead4_ExtData TransformTo be used for extension
Pre_MapToMedication4DetailsData TransformTo be used for extension
Post_MapToMedication4DetailsData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-PatientMedications
MedicationService REST
D_FHIR4MedicationData PageTo call connector and map request and response
MedicationFHIR4Connect RESTCall REST Service using endpoint URL
MapToMedication4Data TransformTo map result data to data page
MapToMedication4DetailsData TransformMap results to PFHC PatientMedications object
Pre_MapToMedication4_ExtData TransformTo be used for extension
Post_MapToMedication4_ExtData TransformTo be used for extension
Pre_MapToMedication4DetailsData TransformTo be used for extension
Post_MapToMedication4DetailsData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-PatientMedications
MedicationDispenseService REST
D_Fhir4MedicationDispenseReadData PageTo call connector and map request and response
MedicationDispenseReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToMedicationDispense4ReadData TransformTo map result data to data page
MapToMedicationDispense4DetailsData TransformMap results to PFHC PatientMedications object
Pre_MapToMedicationDispense4Read_ExtData TransformTo be used for extension
Post_MapToMedicationDispense4Read_ExtData TransformTo be used for extension
Pre_MapToMedicationDispense4Details_ExtData TransformTo be used for extension
Post_MapToMedicationDispense4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
lass: PegaHC-Data-PatientMedications
MedicationDispenseService REST
D_Fhir4MedicationDispenseData PageTo call connector and map request and response
MedicationDispenseFHIR4Connect RESTCall REST Service using endpoint URL
MapToMedicationDispense4Data TransformTo map result data to data page
MapToMedicationDispense4DetailsData TransformMap results to PFHC PatientMedications object
Pre_MapToMedicationDispense4_ExtData TransformTo be used for extension
Post_MapToMedicationDispense4_ExtData TransformTo be used for extension
Pre_MapToMedicationDispense4Details_ExtData TransformTo be used for extension
Post_MapToMedicationDispense4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-PatientMedications
MedicationStatementService REST
D_FHIR4MedicationStatementReadData PageTo call connector and map request and response
MedicationStatementReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToMedicationStatement4ReadData TransformTo map result data to data page
MapToMedicationStatement4DetailsData TransformMap results to PFHC PatientMedications object
Pre_MapToMedicationStatement4Read_ExtData TransformTo be used for extension
Post_MapToMedicationStatement4Read_ExtData TransformTo be used for extension
Pre_MapToMedicationStatement4Details_ExtData TransformTo be used for extension
Post_MapToMedicationStatement4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-PatientMedications
MedicationStatementService REST
D_FHIR4MedicationStatementData PageTo call connector and map request and response
MedicationStatementFHIR4Connect RESTCall REST Service using endpoint URL
MapToMedicationStatement4Data TransformTo map result data to data page
MapToMedicationStatement4DetailsData TransformMap results to PFHC PatientMedications object
Pre_MapToMedicationStatement4_ExtData TransformTo be used for extension
Post_MapToMedicationStatement4_ExtData TransformTo be used for extension
Pre_MapToMedicationStatement4Details_ExtData TransformTo be used for extension
Post_MapToMedicationStatement4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Observation
ObservationService REST
D_FHIR4ObservationReadData PageTo call connector and map request and response
ObservationReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToObservationDetail4ReadData TransformTo map result data to data page
MapToObservation4DetailsData TransformMap results to PFHC Observation object
Pre_MapToObservationDetail4Read_ExtData TransformTo be used for extension
Post_MapToObservationDetail4Read_ExtData TransformTo be used for extension
Pre_MapToObservation4Details_ExtData TransformTo be used for extension
Post_MapToObservation4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Observation
ObservationService REST
D_FHIR4ObservationData PageTo call connector and map request and response
ObservationFHIR4Connect RESTCall REST Service using endpoint URL
MapToObservation4Data TransformTo map service request data
MapToObservation4DetailsData TransformTo map result data to data page
Pre_MapToObservation4_ExtData TransformTo be used for extension
Post_MapToObservation4_ExtData TransformTo be used for extension
Pre_MapToObservation4Details_ExtData TransformTo be used for extension
Post_MapToObservation4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Party-Member
PatientService REST
D_FHIR4PatientReadData PageTo call connector and map request and response
PatientReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToPatientDetail4ReadData TransformTo map result data to data page
MapToPatient4DetailsData TransformMap results to PFHC Member object
Pre_MapToPatinetDetail4Read_ExtData TransformTo be used for extension
Post_MapToPatientDetail4Read_ExtData TransformTo be used for extension
Pre_MapToPatient4Details_ExtData TransformTo be used for extension
Post_MapToPatient4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Party-Member
PatientService REST
D_FHIR4PatientData PageTo call connector and map request and response
PatientFHIR4Connect RESTCall REST Service using endpoint URL
MapToPatients4Data TransformTo map result data to data page
MapToPatient4DetailsData TransformMap results to PFHC Member object
Pre_MapToPatients4_ExtData TransformTo be used for extension
Post_MapToPatients4_ExtData TransformTo be used for extension
Pre_MapToPatient4Details_ExtData TransformTo be used for extension
Post_MapToPatient4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Party-Provider-Practitioner
PractitionerService REST
D_FHIR4PractitionerReadData PageTo call connector and map request and response
PractitionerReadFHIr4Connect RESTCall REST Service using endpoint URL
MapToPractitionerDetail4ReadData TransformTo map result data to data page
MapToPractitioner4DetailsData TransformMap results to PFHC Practitioner object
Pre_MapToPractitionerDetail4Read_ExtData TransformTo be used for extension
Post_MapToPractitionerDetail4Read_ExtData TransformTo be used for extension
Pre_MapToPractitioner4Details_ExtData TransformTo be used for extension
Post_MapToPractitioner4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Party-Provider-Practitioner
PractitionerService REST
D_FHIR4PractitionerData PageTo call connector and map request and response
PractitionerFHIR4Connect RESTCall REST Service using endpoint URL
MapToPractitioner4Data TransformTo map service request data
MapToPractitioner4DetailsData TransformTo map result data to data page
Pre_ MapToPractitioner4_ExtData TransformTo be used for extension
Post_ MapToPractitioner4_ExtData TransformTo be used for extension
Pre_MapToPractitioner4Details_ExtData TransformTo be used for extension
Post_MapToPractitioner4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Party-Provider
PractitionerRoleService REST
D_FHIR4PractitionerRoleReadData PageTo call connector and map request and response
PractitionerRoleReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToPractitionerRoleDetail4ReadData TransformTo map result data to data page
MapToPractitionerRole4DetailsData TransformMap to PFHC object
Pre_MapToPractitionerRoleDetail4Read_ExtData TransformTo be used for extension
Post_MapToPractitionerRoleDetail4Read_ExtData TransformTo be used for extension
Pre_MapToPractitionerRole4Details_ExtData TransformTo be used for extension
Post_MapToPractitionerRole4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Party-Provider
PractitionerRoleService REST
D_FHIR4PractitionerRoleData PageTo call connector and map request and response
PractitionerRoleFHIR4Connect RESTCall REST Service using endpoint URL
MapToPractitionerRole4Data TransformTo map result data to data page
MapToPractitionerRole4DetailsData TransformMap to PFHC object
Pre_MapToPractitionerRole4_ExtData TransformTo be used for extension
Post_MapToPractitionerRole4_ExtData TransformTo be used for extension
Pre_MapToPractitionerRole4Details_ExtData TransformTo be used for extension
Post_MapToPractitionerRole4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-ClinicalProcedure
ProcedureService REST
D_FHIR4ClinicalProcedureReadData PageTo call connector and map request and response
ProcedureReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToClinicalProcedure4ReadData TransformTo map result data to data page
MapToClinicalProcedure4DetailsData TransformMap results to PFHC ClinicalProcedure object
Pre_MapToClinicalProcedure4Read_ExtData TransformTo be used for extension
Post_MapToClinicalProcedure4Read_ExtData TransformTo be used for extension
Pre_MapToClinicalProcedure4Details_ExtData TransformTo be used for extension
Post_MapToClinicalProcedure4Details_ExtData TransformTo be used for extension

Search operation

parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-ClinicalProcedure
ProcedureService REST
D_FHIR4ClinicalProcedureData PageTo call connector and map request and response
ProcedureFHIR4Connect RESTCall REST Service using endpoint URL
MapToClinicalProcedure4Data TransformTo map result data to data page
MapToClinicalProcedure4DetailsData TransformMap results to PFHC ClinicalProcedure object
Pre_MapToClinicalProcedure4_ExtData TransformTo be used for extension
Post_MapToClinicalProcedure4_ExtData TransformTo be used for extension
Pre_MapToClinicalProcedure4Details_ExtData TransformTo be used for extension
Post_MapToClinicalProcedure4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-Goal
ScheduleService REST
D_FHIR4ScheduleReadData PageTo call connector and map request and response
ScheduleReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToSchedule4ReadData TransformTo map result data to data page
MapToSchedule4DetailsData TransformMap results to PFHC Goal object
Pre_MapToSchedule4Read_ExtData TransformTo be used for extension
Post_MapToSchedule4Read_ExtData TransformTo be used for extension
Pre_MapToSchedule4Details_ExtData TransformTo be used for extension
Post_MapToSchedule4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-Goal
ScheduleService REST
D_FHIR4ScheduleData PageTo call connector and map request and response
ScheduleFHIR4Connect RESTCall REST Service using endpoint URL
MapToSchedule4Data TransformTo map result data to data page
MapToSchedule4DetailsData TransformMap results to PFHC Goal object
Pre_MapToSchedule4_ExtData TransformTo be used for extension
Post_MapToSchedule4_ExtData TransformTo be used for extension
Pre_MapToSchedule4Details_ExtData TransformTo be used for extension
Post_MapToSchedule4Details_ExtData TransformTo 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 NameRule TypeUsage
Class: PegaHC-Data-AppointmentSchedule
SlotService REST
D_FHIR4SlotReadData PageTo call connector and map request and response
SlotReadFHIR4Connect RESTCall REST Service using endpoint URL
MapToSlot4ReadData TransformTo map result data to data page
MapToSlot4DetailsData TransformMap results to PFHC AppointmentSchedule object
Pre_MapToSlot4Read_ExtData TransformTo be used for extension
Post_MapToSlot4Read_ExtData TransformTo be used for extension
Pre_MapToSlot4Details_ExtData TransformTo be used for extension
Post_MapToSlot4Details_ExtData TransformTo be used for extension

Search operation

Parameters

Key rules

Rule NameRule TypeUsage
Class: PegaHC-Data-AppointmentSchedule
SlotService REST
D_FHIR4SlotData PageTo call connector and map request and response
SlotFHIR4Connect RESTCall REST Service using endpoint URL
MapToSlot4Data TransformTo map result data to data page
MapToSlot4DetailsData TransformMap results to PFHC AppointmentSchedule object
Pre_ MapToSlot4_ExtData TransformTo be used for extension
Post_ MapToSlot4_ExtData TransformTo be used for extension
Pre_MapToSlot4Details_ExtData TransformTo be used for extension
Post_MapToSlot4Details_ExtData TransformTo be used for extension

Testing

If you want to run a simple test to ensure the APIs work against the FHIR®© server:

  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 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:
    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 HC FHIR Administrator operator.
    3. 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.
    4. Save the new operator record.
  2. Log in as the new operator that you created.
  3. Navigate to Designer Studio > Data Model > View external data entities.
  4. Expand the Bundle API Data Type and click on the D_GetFHIR4Patient Data Page under Member category link to open it.
  5. Click Run from the Actions menu of the Data Page rule.
  6. Click Run on the Run Data Page screen.
    Note: The Data Page is defaulted with a search parameter as was used in testing the APIs against the FHIR Source Server.
  7. 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.
  8. 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.
  9. 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.

  1. Log into your application using the administrator login.
  2. On the Dev Studio menu, navigate to Integration > Connectors > Create REST Integration.
  3. Configure the System details. Provide the FHIR end-point URL of desired resource as shown below.

  4. Configure the Resource path, Query String parameters, and authentication as necessary.
  5. In the Resource Methods step, specify the Resource name and select the desired Method, such as GET or POST.

  6. On Integration layer provide the Parent Class name and Connector name as shown below.

  7. 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:

  8. Extend the LoadFHIR4Settings DataTransform rule in your application layer and specify the end-point URLs of your source systems.
  9. Analyze PegaHC-Data- classes to identify existing logical data class to map the response data and/or create a new data class as needed.
  10. 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.
  11. 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.

Note: The above mapping Data transform rule is marked as final and you cannot override this rule in your layer. So, we provided ‘Pre_MapToPatiensts4_Ext’ and ‘Post_MapToPatientss4_Ext’ data transforms for any extensions in your layer. Both rules are marked for extension as shown below.

Note: Refer to the FHIR Resource Mapping document for details on pre-configured mapping for supported FHIR Resources.

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.

Note: The sample rules shown in the next two chapters are shown using the Patient resource as an example. Each published resource API has similar rules associated with it.

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.

Key rules in service execution
Rule NameRule TypeUsage
<Resource> Example: PayersService RESTREST service rule that identifies the path, parameters, and methods
Get<Resource>API Example: GetPayerAPIActivityMethod in REST service to get resource details
MapFrom<Resource> Example: MapFromPayersData TransformMap 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 CodeDescription
200Success(OK)
201Created
204No content

Error codes

HTTP Status CodeDescription
400Bad request
401Unauthorized
403Forbidden
404Not found
412Precondition failed
500Internal 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 NameRule TypeUsage
Class: Int-Fhir401-PatientAPI
patientService REST
GetPatientReadActivityMethod in REST service to get patient
MapFromPatientData TransformMap results from PFHC Member (Patient) to API Integration object
Pre_MapFromPatient_EXTData TransformPre mapping data transform
Post_MapFromPatient_EXTData TransformPost 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 NameRule TypeUsage
patient01122a97dca927210827560cb7d76af8Service REST
GetPatientSearchActivityMethod in REST service to get patient details
MapFromPatientData TransformMap results from PFHC Member (Patient) to API Integration object
Pre_MapFromPatient_EXTData TransformPre mapping data transform
Post_MapFromPatient_EXTData TransformPost 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 NameRule TypeUsage
Class: Int-Fhir401-CoverageAPI
coverage_varc5a964023f10a197fee699d0e9f2b68eService REST
GetCoverageReadActivityMethod in REST service to get coverage related details
MapFromCoverageData TransformMap results from PFHC Policy to API Integration object
Pre_MapFromCoverage_EXTData TransformPre mapping data transform
Post_MapFromCoverage_EXTData TransformPost 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 NameRule TypeUsage

Class: Int-Fhir401-CoverageAPI

coverage9841bdc50c4226cb6ec5db7649424 9e6Service REST
GetCoverageSearchActivityMethod in REST service to get coverage related details
MapFromCoverageData TransformMap results from PFHC Policy to API Integration object
Pre_MapFromCoverage_EXTData TransformPre mapping data transform
Post_MapFromCoverage_EXTData TransformPost 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 NameRule TypeUsage
Class: Int-Fhir401-ExplanationOfBenefitAPI
explanationofbenefit_var_var6ff11ae7c7f089 4bff63db3a75686cc8Service REST
GetExplanationOfBenefitReadActivityMethod in REST service to get details related to explanation of benefit.
MapFromExplanationOfBenefitData TransformMap results from PFHC Polciy to API Integration object
Pre_MapFromEOB_EXTData TransformPre mapping data transform
Post_MapFromEOB_EXTData TransformPost 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 NameRule TypeUsage

Class: Int-Fhir401-ExplanationOfBenefitAPI

explanationofbenefitf74ff796469fe6c8d5e36 76e4411d79cService REST
GetExplanationOfBenefitReadActivityMethod in REST service to get details related to explanation of benefit.
MapFromExplanationOfBenefitData TransformMap results from PFHC Policy to API Integration object
Pre_MapFromEOB_EXTData TransformPre mapping data transform
Post_MapFromEOB_EXTData TransformPost mapping data transform

Testing the services

  1. You may test the above services by running the REST service rule from Actions menu.
  2. 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 NameRule TypeUsage

Class: Int-Fhir401-PatientAPI

D_GetFHIR4PatientServiceRead Parameters: IDData PageTo call connector
PatientFHIR4ServiceReadConnect RESTCall REST Service using endpoint URL

Patient (search) data page key rules

Rule NameRule TypeUsage
Class: Int-Fhir401-PatientAPI
D_GetFHIR4PatientService Parameters: ID, name, given, gender, family,birthdate,address, addresscIty, addressState, addressPostalCode, AaddressCountry,phone, language, generalPractitioner, emailData PageTo call connector
PatientFHIR4ServiceConnect RESTCall REST Service using endpoint URL

Coverage (read) data page key rules

Rule NameRule TypeUsage
Class: Int-Fhir401-CoverageAPI
D_GetFHIR4CoverageServiceRead Parameters: IDData PageTo call connector
CoverageFHIR4ServiceReadConnect RESTCall REST Service using endpoint URL

Coverage (search) data page key rules

Rule NameRule TypeUsage

Class: Int-Fhir401-CoverageAPI

D_GetFHIR4CoverageService Parameters: ID, BeneficiaryIDData PageTo call connector
CoverageFHIR4ServiceConnect RESTCall REST Service using endpoint URL

Explanation of read (read) data page key rules

Rule NameRule TypeUsage
Class: Int-Fhir401-ExplanationOfBenefitAPI
D_GetFHIR4EOBServiceRead Parameters: ID, ClaimIDData PageTo call connector
EOBFHIR4ServiceReadConnect RESTCall REST Service using endpoint URL

Explanation of read (search) data page key rules

Rule NameRule TypeUsage

Class: Int-Fhir401-ExplanationOfBenefitAPI

D_GetFHIR4EOBService Parameters: ID, ClaimID, CreatedData PageTo call connector
EOBFHIR4ServiceConnect RESTCall REST Service using endpoint URL

  1. You may invoke the services from the external tools like Postman.
  2. 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:

  1. Login as administrator to Dev Studio.
  2. 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.

  3. 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

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