Patient Examples (Obsolete)

Examples of using the API

Obsolete

Patient class is obsolete. Please consider use of Patient2.

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 GET

http://devs.patient-inquiry.com/patient/json/BobFred/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a

Response

{"FirstName":"Bob","LastName":"Fred","DateOfBirth":"\/Date(-18520800000-0400)\/","Email":"bobfred@fotoinc.com","ExternalId":"BobFred","Gender":"M","Language":"ar"}

XML GET

http://devs.patient-inquiry.com/patient/BobFred/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a

Response

<IncomingPatient xmlns="http://schemas.datacontract.org/2004/07/PI.Domain" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<FirstName>Bob</FirstName>
<LastName>Fred</LastName>
<DateOfBirth>1969-05-31T11:20:00</DateOfBirth>
<Email>bobfred@fotoinc.com</Email>
<ExternalId>BobFred</ExternalId>
<Gender>M</Gender>
<Language>ar</Language>
</IncomingPatient>

JSON POST

http://devs.patient-inquiry.com/patient/json/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a

User-Agent: Fiddler
Content-Type: text/json

[{
  "FirstName":"Some",
  "LastName":"Testing",
  "DateOfBirth":"\/Date(928164000000-0400)\/",
  "Email":"testing@fotoinc.com",
  "ExternalId":"SomeTesting",
  "Gender":"F",
  "Language":"en"
}]

Response

[{"MessageID":139,"OrganizationID":1,"PatientExternalID":"SomeTesting","Success":true,"Text":null}]

XML POST

http://devs.patient-inquiry.com/patient/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a

User-Agent: Fiddler
Content-Type: text/xml

<ArrayOfIncomingPatient xmlns="http://schemas.datacontract.org/2004/07/PI.Domain">
  <IncomingPatient>
    <FirstName>Jane</FirstName>
    <LastName>Doe</LastName>
    <DateOfBirth>1956-03-30T11:20:00</DateOfBirth>
    <Email>JaneDoe@fotoinc.com</Email>
    <ExternalId>JaneDoe</ExternalId>
    <Gender>F</Gender>
    <Language>es</Language>
  </IncomingPatient>
  <IncomingPatient>
    <FirstName>Bob</FirstName>
    <LastName>Fred</LastName>
    <DateOfBirth>1969-05-31T11:20:00</DateOfBirth>
    <Email>bobfred@fotoinc.com</Email>
    <ExternalId>BobFred</ExternalId>
    <Gender>M</Gender>
    <Language>ar</Language>
  </IncomingPatient>
</ArrayOfIncomingPatient>

Response

<ArrayOfAPIPatientResponse xmlns="http://schemas.datacontract.org/2004/07/PI.Domain" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <APIPatientResponse>
    <MessageID>140</MessageID>
    <OrganizationID>1</OrganizationID>
    <PatientExternalID>JaneDoe</PatientExternalID>
    <Success>true</Success>
    <Text i:nil="true"/>
  </APIPatientResponse>
  <APIPatientResponse>
    <MessageID>140</MessageID>
    <OrganizationID>1</OrganizationID>
    <PatientExternalID>BobFred</PatientExternalID>
    <Success>true</Success>
    <Text i:nil="true"/>
  </APIPatientResponse>
</ArrayOfAPIPatientResponse>

HL7 REST sample

XML POST

http://localhost:54278/HL7patient/?Api-Key=a8e09fcb-76d4-4912-be4c-6ed3bcd1e93a

User-Agent: Fiddler
Content-Type: text/xml
Host: localhost:54278
Content-Length: 948

<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"><![CDATA[MSH|...other HL7 pipe delimited data|]]></string>