API

Patient Data

Syntax

XML 

Use an XML snippet with the following tags in order to match a patient and request a token.

                <xml>
<ptData>
 <ptLast>
   LastName
 </ptLast>
 <ptFirst>
  FirstName
 </ptFirst>
 <ptMid>
   MiddleName
 </ptMid>
 <ptDOB>
   19700101 /* formatted as YYYYMMDD */
 </ptDOB>
 <ptSSN>
   123456789 /* formatted as 999999999 */
 </ptSSN>
</ptData>
</xml>
                
              

Query String The query sting has the following parameters.

                request
    getToken
    getCat
    getAll
ptToken /* the value of the token returned from the request=getToken */
startDate /* formatted as YYYYMMDD */
endDate /* formatted as YYYYMMDD */
                
              

Responses

Query request=getToken

Response <token>12772</token> (This is the unique identifier)

This can now be used for subsequent requests.

Exceptions

<error>No Unique Pt</error>

There is not enough information to uniquely identify a patient. Verify that XML is formatted correctly, and that the information is correct.


Query getCat [include xml]

The XML file should detail the type of data being requested: (by category)

                <xml>
 <categoryList>
 <category>
   Alert
 </category>
 </categoryList>
</xml>
                
              

Common Categories

                Advance Directive
Alert
Encounter
Family Hx
Immunization
Med Equipment
Medication
Payers
Patient
Plan of Care
Problem
Procedure
Purpose
Results
Social Hx
Vital Signs
                
              


Header "Authorization" with contents of "Auth " + Base64 of username:password;

                Auth ZHJ1bW1vbmQ6ZHJ1bW1vbmQxMw== 
for username drummond and password drummond13
                
              

This can be tested using CURL:

                curl https://secure-ppoffice.com/cgi-bin/WebObjects/provider/wa/applicationAccess?request=getToken
                
              
                curl -H "Content-Type: application/x-www-form-urlencoded" --header "Authorization: Auth ZHJ1bW1vbmQ6ZHJ1bW1vbmQxMw==" --data "@/Users/dfaber/Developer/EMR_Program/ONC_certification/ApplicationAccess/larry.xml" http://localhost/cgi-bin/WebObjects/PPOffice.woa/-55559/wa/applicationAccess?request=getToken
                
              

To get the CCD use: request=getAll&ptToken=19498

                curl -H "Content-Type: application/x-www-form-urlencoded" --header "Authorization: Auth ZHJ1bW1vbmQ6ZHJ1bW1vbmQxMw==" http://localhost/cgi-bin/WebObjects/PPOffice.woa/-55559/wa/applicationAccess?request=getAll&ptToken=19498