Reputation: 31
I am trying to access PokitDok's eligibility API, which wants the following:
client.eligibility({
member: {
birth_date: "1970-01-25",
first_name: "Jane",
last_name: "Doe",
id: "W000000000"
},
provider: {
first_name: "JEROME",
last_name: "AYA-AY",
npi: "1467560003"
},
trading_partner_id: "MOCKPAYER"
})
The ColdFusion I have written is the following:
<cfset SubmissionFields = {
"member": {
birth_date: "1970-01-25",
"first_name": "Jane",
"last_name": "Doe",
"id": "W000000000"
},
"provider": {
"first_name": "JEROME",
"last_name": "AYA-AY",
"npi": "1467560003"
},
"trading_partner_id": "MOCKPAYER"
} />
<cfhttp url="https://platform.pokitdok.com/oauth2/token/eligibility/" username="xxxx" password="xxxx" method="post" result="httpResponse" timeout="60">
<cfhttpparam type="header" name="Content-Type" value="application/json" />
<cfhttpparam type="body" value="#serializeJSON(SubmissionFields)#">
</cfhttp>
Where do I put the client.eligibility function call (if that is what it is)?
Thanks!
Upvotes: 1
Views: 139
Reputation: 21
PokitDok has an open source Java client, which could be integrated into your Coldfusion project since it runs in the JVM. Here is their Java client:
https://github.com/pokitdok/pokitdok-java
Here are two other StackOverflow posts that address how to integrate existing Java Libraries into your Coldfusion project:
1) How do you use java files in Coldfusion
2) Include Java Files into Coldfusion
(affiliation edit: I am pokitdok's tech evangelist)
Upvotes: 2