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

Here at FOTO we are a Microsoft .Net shop so our SOAP testing application is built as a windows console application in VS2010. Please feel free to download it and use it as jumping off point for your implementation. If you've used web services via WCF before then it should look familiar. The biggest item to pay attention to is the CustomMessageInspector.cs which is responsible for injecting the API Key into the header.

Download SOAP Testing Client