Patient (Obsolete)

Patient import into PI Web

Obsolete

This class is obsolete. Please consider use of Patient2.

What makes up a Patient?

A patient in FOTO is a person that is evaluated via the Patient Inquiry web application. The evaluation is traditionally done via surveys that result in a risk adjusted predicted outcome reported to the clinician. The evaluation and the risk adjustment drive the data we need to have for patient. Here are the properties that make up patient including field sizes and types used for storage. Notice that ExternalID is required as this will identify that person and be used for controlling of future API interactions

  FirstName nvarchar(64) NULL
  LastName nvarchar(64) NULL
  DateOfBirth datetime NULL
  Email nvarchar(256) NULL
  ExternalID nvarchar(32) NOT NULL
  Gender char(1) NULL
  Language char(2) NULL

Patient Workflow

Patients are created by the clinics with the Patient Inquiry web application highlighting patients that have been recently been active. All patients that are imported via the API are held in separate location from the active patients. When clinic staff starts to enter new patients they are presented with patients that have been imported so they do not have to enter all information. This workflow keeps the patients list in the Patient Inquiry web application clean but also presents the imported information at entry time to save data entry time and assure agreement in data between systems. These advantages are why patients are the initial focus of the API. Since these are stored separately we refer to them as incoming patients.

Importing Patients

The API presents multiple ways for importing patients, managing your imported patients and, for debugging use, the ability to query recently imported patients.

All the patient import methods will check the existing incoming patients' ExternalIDs and update those that match and creating new entries for those that don't yet exist.

SOAP Methods

SOAP Discovery

SOAP 1.1
  http://devs.patient-inquiry.com/patient/soap?wsdl
SOAP 1.2
  http://devs.patient-inquiry.com/patient/soap12?wsdl

APIPatientResponse[] Create(IncomingPatient[])

Imports multiple patients — Inspects each IncomingPatient and updates those already imported and inserts new ones.


APIPatientResponse Update(IncomingPatient)

Inserts/Updates a single patient — If the patient exists (verified by ExternalID) updates otherwise creates.


APIPatientResponse Delete(string)

Deletes the imported patient with the provided ExternalID


IncomingPatient[] GetCollection() Development Only

Gets the incomingPatients imported with the lastest message


IncomingPatient Get(string) Development Only

Retrieves the latest patient information for the given ExternalID

REST Methods

Resource URLs

REST XML
  http://devs.patient-inquiry.com/patient/
REST json
  http://devs.patient-inquiry.com/patient/json/

POST

Request imports multiple patients — Inspects each IncomingPatient and updates those already imported and inserts new ones.

Parameters: IncomingPatient[]
Response: APIPatientResponse[] — Each patient record is individually marked with success or failure.

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

PUT

Inserts/Updates a single patient — If the patient exists (verified by ExternalID) updates otherwise creates.

Parameters: IncomingPatient
Response: APIPatientResponse

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

DELETE

Deletes the imported patient with the provided ExternalID

Parameters: externalPatientId
Response: APIPatientResponse

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

GET Development Only

Gets the incomingPatients imported with the lastest message — Provide an ExternalID in the URL to retrieve a single patient

Parameters: Optional - externalPatientId
Response: IncomingPatient[] for blank get or a single IncomingPatient if externalPatientId was provided

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

Supporting Objects and Structures (order matters when using XML)

  public class IncomingPatient
  {
    public string FirstName;
    public string LastName;
    public DateTime DateOfBirth;
    public string Email;
    public string ExternalId ;
    public string Gender;
    public string Language;
  }

Language is a two-character code which adheres to the ISO 639.1 standard and is expected in lowercase.


  public class APIPatientResponse
  {
    public int MessageID;
    public int OrganizationID;
    public string PatientExternalID;
    public bool Success;
    public string Text;
  }

Do you support HL7?

There is a method available that HL7 messages can be passed to. We currently accept HL7 version 2.2, 2.3 and 2.3.1 messages and take action on the following trigger events.

2.2, 2.3 and 2.3.1

2.3 and 2.3.1

What is used from message

2.2

2.3 and 2.3.1

SOAP

SOAP Discovery

SOAP 1.1
  http://devs.patient-inquiry.com/HL7patient2/soap?wsdl
SOAP 1.2
  http://devs.patient-inquiry.com/HL7patient2/soap12?wsdl

APIPatientResponse Create(string)

The string provided is the HL7 message content. — Will perform the operation based off the trigger event code. Since the events are present in the message this is the only method call available. Message sections should be divided by a carriage return. All carriage return/line feed combinations will be processed into a single carriage return.

REST

URLs

REST XML
  http://devs.patient-inquiry.com/HL7patient2/

POST

Request is HL7 message content wrapped in XML and CDATA (see samples) — Will perform the operation based off the trigger event code. Since the events are present in the message this is the only method call available. Message sections should be divided by a carriage return. All carriage return/line feed combinations will be processed into a single carriage return.
Response is an APIPatientResponse