Referral Examples

Examples of using the API

REST samples

These following REST examples were all run via Fiddler. For more information on Fiddler and SOAP samples please refer to our Samples page.


JSON POST (EmployerReferral2)

http://devs.patient-inquiry.com/referral/json/EmployerReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
User-Agent: Fiddler
Content-Type: text/json
{
  "ExternalEpisodeId":"VendorId",
  "Id":"VendorReferralId",
  "Name":"Employer Name",
  "Misc":"",
  "Email":"Email Address"
}

XML POST (EmployerReferral2)

  http://devs.patient-inquiry.com/referral/EmployerReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
  User-Agent: Fiddler
  Content-Type: text/xml
  <IncomingReferral2 xmlns="http://schemas.datacontract.org/2004/07/PI.Domain">
    <Email>Email Address</Email>    
    <ExternalEpisodeId>VendorId</ExternalEpisodeId>
    <Id>VendorReferralId</Id>
    <Misc>Misc</Misc>
    <Name>Employer Name</Name>
  </IncomingReferral2>

JSON POST (InsuranceReferral2)

http://devs.patient-inquiry.com/referral/json/InsuranceReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
User-Agent: Fiddler
Content-Type: text/json
{
  "ExternalEpisodeId":"VendorId",
  "Id":"VendorReferralId",
  "Name":"Insurance Name",
  "Misc":"",
  "Email":"Email Address"
}

XML POST (InsuranceReferral2)

  http://devs.patient-inquiry.com/referral/InsuranceReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
  User-Agent: Fiddler
  Content-Type: text/xml
  <IncomingReferral2 xmlns="http://schemas.datacontract.org/2004/07/PI.Domain">
    <Email>Email Address</Email>
    <ExternalEpisodeId>VendorId</ExternalEpisodeId>
    <Id>VendorReferralId</Id>
    <Misc/>
    <Name>Insurance Name</Name>
  </IncomingReferral2>

JSON POST (OtherReferral2)

http://devs.patient-inquiry.com/referral/json/OtherReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
User-Agent: Fiddler
Content-Type: text/json
{
  "ExternalEpisodeId":"VendorId",
  "Id":"VendorReferralId",
  "Name":"Other Name",
  "Misc":"",
  "Email":"Email Address"
}

XML POST (OtherReferral2)

  http://devs.patient-inquiry.com/referral/OtherReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
  User-Agent: Fiddler
  Content-Type: text/xml
  <IncomingReferral2 xmlns="http://schemas.datacontract.org/2004/07/PI.Domain">
    <Email>Email Address</Email>    
    <ExternalEpisodeId>VendorId</ExternalEpisodeId>
    <Id>VendorReferralId</Id>
    <Misc/>
    <Name>Other Name</Name>
  </IncomingReferral2>

JSON POST (PhysicianReferral2)

http://devs.patient-inquiry.com/referral/json/PhysicianReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
User-Agent: Fiddler
Content-Type: text/json
{
  "ExternalEpisodeId":"VendorId",
  "FirstName":"Physician First Name",
  "Id":"VendorReferralId",
  "LastName":"Physician Last Name",
  "Title":"Physician Title",
  "Email":"Email Address"
}

XML POST (PhysicianReferral2)

  http://devs.patient-inquiry.com/referral/PhysicianReferral2/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a
  User-Agent: Fiddler
  Content-Type: text/xml
  <IncomingPhysicianReferral2 xmlns="http://schemas.datacontract.org/2004/07/PI.Domain">
    <Email>Email Address</Email>
    <ExternalEpisodeId>VendorId</ExternalEpisodeId>
    <FirstName>Physician First Name</FirstName>
    <Id>VendorReferralId</Id>
    <LastName>Physician Last Name</LastName>
    <Title>Physician Title</Title>
  </IncomingPhysicianReferral2>

SOAP Samples

Our SOAP testing application is built as a Windows console application in VS2010. Feel free to download our SOAP Testing Client using the link below and use it as a starting point for your implementation. If you have used web services via WCF before, then this should look familiar. A key item to pay attention to is the CustomMessageInspector.cs, which is responsible for inserting the API Key into the header.

Download