In this blog, we explore how to integrate insurance and eligibility verification with an FHIR-based system using pVerify. Specifically, we’ll be leveraging pVerify’s Eligibility Summary API to achieve this.
As described on their platform, pVerify is “The leader in all-payer real-time patient insurance eligibility verification, offering instant API and batch solutions that combine technology with AI to simplify the patient care cycle for healthcare providers in medical, dental, and vision services.” In short, pVerify simplifies insurance and eligibility verification for healthcare providers. In this blog, we’ll focus on the Eligibility Summary API of pVerify’s REST API to handle patient eligibility checks.
The standout feature of pVerify is its real-time eligibility verification. pVerify provides immediate access to patient insurance information while ensuring that no sensitive data is stored on their servers. All data transmissions are encrypted, providing a secure environment even on public networks.
pVerify provides a RESTful API, but our focus will be on the Eligibility Summary API.
The Eligibility Summary API has the following signature:
Request:
curl --location 'https://api.pverify.com/api/EligibilitySummary' \
--header 'Authorization: Bearer {{access-token}}' \
--header 'Client-API-Id: {{client-api-id}}' \
--header 'Content-Type: application/json' \
--data '{
"payerCode": "00192",
"payerName": "UHC",
"provider": {
"firstName": "",
"middleName": "",
"lastName": " test name",
"npi": "1234567890",
"pin":"00000"
},
"subscriber": {
"firstName": "fname",
"dob": "mm/dd/yyyy",
"lastName": "lname",
"memberID": "123sfadfaf"
},
"dependent": null,
"isSubscriberPatient": "True",
"doS_StartDate": "02/02/2021",
"doS_EndDate": "02/02/2021",
"PracticeTypeCode":"3",
"referenceId":"Pat MRN",
"Location":"Any location Name",
"IncludeTextResponse":"false",
"InternalId":"",
"CustomerID":""
}'
This returns a response signature which is too large to present here. So we will be separating the important stuff as follows.
Our Plan Comprises Three Parts:
We will be using Medplum, a healthcare/FHIR-based, open-source development platform. For ease of use.
With our approach in place, let’s start with the first part:
CER is a standard FHIR resource. We can take input from the user or any other source and instantiate a CER object.
We’re using a form input to pass the data to the createResource Function.
const coverageEligibilityRequest: any = await medplum.createResource({
resourceType: "CoverageEligibilityRequest",
status: "active",
purpose: ["validation"],
patient: {
reference: `Patient/${patientId}`,
},
servicedPeriod: {
start: form.miscellaneous.fromDate.toISOString().split("T")[0],
end: form.miscellaneous.toDate.toISOString().split("T")[0],
},
created: new Date().toISOString().split("T")[0],
insurer: {
reference: `Organization/${form.payer.id}`,
},
insurance: [
{
coverage: {
reference: `Coverage/${coverage.id}`,
},
},
],
provider: {
reference: `Organization/${form.provider.id}`,
},
item: [
{
category: {
coding: [
{
code: form.serviceType.id,
display: serviceTypeMap.find(
(x: any) => x.value == form.serviceType.id
)?.label,
},
],
},
},
],
});
This resource and its field should be tailored to the use case. Currently, we’re using the form inputs.
Note – Eligibility Summary supports 2 types of verification, Dependent and Subscriber, where the subscriber is straightforward as the patient is the plan holder.
For the Dependent, we’ll need to hold the subscriber’s information in the RelatedPerson resource which refers to the dependent patient.
As an example, here is the structure of a parent-child relation, where the child is dependent on the parent.
This takes care of creating and storing CER in FHIR format.
Now that we have the CER we’ll need to convert it to a valid format and call the API.
Conversion can be done in this way:
const subscriberR = await (coverage?.subscriber ? medplum.readReference(coverage?.subscriber) : patient);
const isSubscriberPatient = (subscriberR == patient);
const dob = new Date(patient.birthDate)
const patientInfo = {
firstName: patient.name[0].given[0],
lastName: patient.name[0].family,
dob: formatDate(dob),
};
const subscriber = isSubscriberPatient
? {
...patientInfo,
memberID: coverage.subscriberId
}
: {
memberID: coverage.subscriberId
};
const dosStart = new Date(eRequest.servicedPeriod.start)
const dosEnd = new Date(eRequest.servicedPeriod.end)
const requestJSON = {
payerCode: insurerIdentifier.value,
payerName: insurer.name,
provider: {
firstName: '',
middleName: '',
lastName: provider.name,
npi: providerIdentifier.value,
pin: ''
},
subscriber: subscriber,
dependent: isSubscriberPatient ? null : {patient: patientInfo},
doS_StartDate: formatDate(dosStart),
doS_EndDate: formatDate(dosEnd),
isSubscriberPatient: isSubscriberPatient,
location: provider.address[0].city,
practiceTypeCode: eRequest.item[0].category.coding[0].code
}
Here eRequest is the CER, and subscriber’s reference is stored in the Coverage resource. Once we have this request, we’ll need to Authenticate and call the API.
AUTH:
It’s a simple OPENAPI oauth with client credentials, it should respond with the Bearer token.
const data = new URLSearchParams()
data.append("Client_Id", clientID);
data.append("Client_Secret", secret);
data.append("grant_type", "client_credentials");
const res = await fetch(`${pverifyAPIBase}/Token`, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
// 'Accept': 'application/json,
},
body: data
})
Once we have the auth token, we can call the API with a converted Response.
Summary:
const res = await fetch(`${pverifyAPIBase}/api/EligibilitySummary`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token,
'Client-API-Id': clientID
// 'Accept': 'application/json,
},
body: JSON.stringify(requestJson)
Finally, we can convert the response back into the FHIR.
While doing this some points to consider:
Handling for non-EDI:
async function convertToCoverageResponse(res:any, eRequest:any, medplum:MedplumClient):Promise<any> {
const identifier = [{
system: codingSystemMap.pverify,
value: String(res.RequestID),
}
];
const efDate = res.PlanCoverageSummary?.EffectiveDate?.replaceAll(' ', '');
const exDate = res.PlanCoverageSummary?.ExpiryDateDate?.replaceAll(' ', '');
const startDate = efDate ? new Date(efDate).toISOString() : null;
const endDate = exDate ? new Date(exDate).toISOString() : null;
const coverage = await medplum.readReference(eRequest.insurance[0].coverage)
const updatedCoverage = await medplum.updateResource<any>({
...coverage,
resourceType: 'Coverage',
id: coverage.id,
status: res.PlanCoverageSummary.Status == 'Active' ? 'active' : 'cancelled',
type: {
coding: [{
system: codingSystemMap.actCode,
code: "EHCPOL",
display: "extended healthcare"
}]
},
period: {
start: startDate??undefined,
end: endDate??undefined
},
class: [{
type: {
text: res.PlanCoverageSummary?.PolicyType??''
},
name: res.PlanCoverageSummary?.PlanName??'',
value: res.PlanCoverageSummary?.PlanNumber??'--'
}],
network: res.PlanCoverageSummary?.PlanNetworkName??undefined
});
const CoverageEligibilityResponse = await medplum.createResource({
resourceType: 'CoverageEligibilityResponse',
identifier: identifier,
status: res.PlanCoverageSummary.Status == 'Active' ? 'active' : 'cancelled',
purpose: ['validation', 'benefits'],
patient: eRequest.patient,
servicedPeriod: eRequest.servicedPeriod,
created: new Date().toISOString(),
request: createReference(eRequest),
outcome: res.IsPayerBackOffice
? 'queued'
: res.ProcessedWithError
? 'error'
: 'complete',
insurer: eRequest.insurer,
insurance: generateBenefitsList(res.ServiceDetails, updatedCoverage, res.PlanCoverageSummary.Status == 'Active'),
extension: generateSummaryList(res)
});
return CoverageEligibilityResponse;
}
Finally, the entire flow should look like this:
Integrating pVerify with an FHIR-based system enables healthcare providers to efficiently verify insurance eligibility. This guide outlines how to convert FHIR’s CoverageEligibilityRequest into a format suitable for pVerify’s Eligibility Summary API and then transform the response back into FHIR’s CoverageEligibilityResponse. This streamlined approach ensures real-time access to patient insurance information while maintaining data security through encrypted transmissions.
This integration significantly simplifies eligibility checks and enhances operational workflows in healthcare. As technology advances, such solutions will be vital for providers to deliver timely and accurate care amid the complexities of insurance verification. By following the outlined steps, organizations can effectively implement this integration and enjoy its many benefits.
The team at Mindbowser was highly professional, patient, and collaborative throughout our engagement. They struck the right balance between offering guidance and taking direction, which made the development process smooth. Although our project wasn’t related to healthcare, we clearly benefited...
Founder, Texas Ranch Security
Mindbowser played a crucial role in helping us bring everything together into a unified, cohesive product. Their commitment to industry-standard coding practices made an enormous difference, allowing developers to seamlessly transition in and out of the project without any confusion....
CEO, MarketsAI
I'm thrilled to be partnering with Mindbowser on our journey with TravelRite. The collaboration has been exceptional, and I’m truly grateful for the dedication and expertise the team has brought to the development process. Their commitment to our mission is...
Founder & CEO, TravelRite
The Mindbowser team's professionalism consistently impressed me. Their commitment to quality shone through in every aspect of the project. They truly went the extra mile, ensuring they understood our needs perfectly and were always willing to invest the time to...
CTO, New Day Therapeutics
I collaborated with Mindbowser for several years on a complex SaaS platform project. They took over a partially completed project and successfully transformed it into a fully functional and robust platform. Throughout the entire process, the quality of their work...
President, E.B. Carlson
Mindbowser and team are professional, talented and very responsive. They got us through a challenging situation with our IOT product successfully. They will be our go to dev team going forward.
Founder, Cascada
Amazing team to work with. Very responsive and very skilled in both front and backend engineering. Looking forward to our next project together.
Co-Founder, Emerge
The team is great to work with. Very professional, on task, and efficient.
Founder, PeriopMD
I can not express enough how pleased we are with the whole team. From the first call and meeting, they took our vision and ran with it. Communication was easy and everyone was flexible to our schedule. I’m excited to...
Founder, Seeke
We had very close go live timeline and Mindbowser team got us live a month before.
CEO, BuyNow WorldWide
If you want a team of great developers, I recommend them for the next project.
Founder, Teach Reach
Mindbowser built both iOS and Android apps for Mindworks, that have stood the test of time. 5 years later they still function quite beautifully. Their team always met their objectives and I'm very happy with the end result. Thank you!
Founder, Mindworks
Mindbowser has delivered a much better quality product than our previous tech vendors. Our product is stable and passed Well Architected Framework Review from AWS.
CEO, PurpleAnt
I am happy to share that we got USD 10k in cloud credits courtesy of our friends at Mindbowser. Thank you Pravin and Ayush, this means a lot to us.
CTO, Shortlist
Mindbowser is one of the reasons that our app is successful. These guys have been a great team.
Founder & CEO, MangoMirror
Kudos for all your hard work and diligence on the Telehealth platform project. You made it possible.
CEO, ThriveHealth
Mindbowser helped us build an awesome iOS app to bring balance to people’s lives.
CEO, SMILINGMIND
They were a very responsive team! Extremely easy to communicate and work with!
Founder & CEO, TotTech
We’ve had very little-to-no hiccups at all—it’s been a really pleasurable experience.
Co-Founder, TEAM8s
Mindbowser was very helpful with explaining the development process and started quickly on the project.
Executive Director of Product Development, Innovation Lab
The greatest benefit we got from Mindbowser is the expertise. Their team has developed apps in all different industries with all types of social proofs.
Co-Founder, Vesica
Mindbowser is professional, efficient and thorough.
Consultant, XPRIZE
Very committed, they create beautiful apps and are very benevolent. They have brilliant Ideas.
Founder, S.T.A.R.S of Wellness
Mindbowser was great; they listened to us a lot and helped us hone in on the actual idea of the app. They had put together fantastic wireframes for us.
Co-Founder, Flat Earth
Ayush was responsive and paired me with the best team member possible, to complete my complex vision and project. Could not be happier.
Founder, Child Life On Call
The team from Mindbowser stayed on task, asked the right questions, and completed the required tasks in a timely fashion! Strong work team!
CEO, SDOH2Health LLC
Mindbowser was easy to work with and hit the ground running, immediately feeling like part of our team.
CEO, Stealth Startup
Mindbowser was an excellent partner in developing my fitness app. They were patient, attentive, & understood my business needs. The end product exceeded my expectations. Thrilled to share it globally.
Owner, Phalanx
Mindbowser's expertise in tech, process & mobile development made them our choice for our app. The team was dedicated to the process & delivered high-quality features on time. They also gave valuable industry advice. Highly recommend them for app development...
Co-Founder, Fox&Fork