Display Appointment data: POST appointmentsdata

Display Appointment data: POST appointmentsdata

Description
Allow a user to see their upcoming and previous appointments on the portal. Using POST Appointmentsdata the appointments can be updated and cancelled to always reflect accurate information on the portal.

URI
https://{server}/v1/practice/{PracticeID}/appointmentsdata
HTTP Method
POST
Required URI Values
server
The domain name of the test or production system.

  • Test system: integration.demo.medfusion.net
  • Production system: integration.medfusion.net
PracticeID
The unique practice integration ID for a given practice. Medfusion will provide a practice ID that you can use during development.

Success Response
  • 202 – Accepted. The message has passed XML validation, been stored, and will be processed later. There may still be errors found when it is processed.
Error Response
  • 400 – Bad request. The data given in the HTTP request failed validation.
  • 401 – Unauthorized request. Check the OAuth attributes.
  • 404 – Not found. The requested resource was not found in the server.
  • 415 – Unsupported media type. The server could not process the request because the content type specified in the request header is not supported.

Sample Call
HTTP Request

POST https://integration.medfusion.net/v1/practice/1c7ecf9f-9700-4e70-b976-9356db658274/appointmentsdata

Body

<?xml version="1.0" encoding="UTF-8"?>
<ns2:AppointmentData xmlns:ns2="http://schema.medfusion.com/appointmentsdata/v1"> 
    <AppointmentMessageHeader>
        <Sender VendorName="Some Medical" DeviceLocalTime="2016-12-12T12:45:12-04:00" DeviceVersion="8.2" DeviceName="asda"/> 
    </AppointmentMessageHeader>
    <Appointments>
    <PracticeIdentifier>
        <IntegrationPracticeId>e60b6468-e585-4a1c-b0d3-e24d0ec76b3a</IntegrationPracticeId>
    </PracticeIdentifier>
    <AppointmentId>123452</AppointmentId>
    <Status>NEW</Status>
    <Type>NEW APPOINTMENT</Type>
    <Description>New Appointment Schedule</Description>
    <Time>2016-12-23T00:00:00</Time>
    <Location>Chico</Location>
    <AppointmentAddress>
        	<Address1>Chico</Address1>
        	<Address2></Address2>
        	<City>California</City>
        	<State>California</State>
        	<ZipCode>12345</ZipCode>
     </AppointmentAddress>
    <Patient>
        <PatientId>787</PatientId>
        <FirstName>Chuck</FirstName>
        <LastName>Swegle</LastName> 
        <DOB>2016-12-23T00:00:00</DOB>
        <Email>dinshawswalnut@gmail.com</Email>
        <Address>
        	<Address1>Chico</Address1>
        	<Address2></Address2>
        	<City>California</City>
        	<State>California</State>
        	<ZipCode>12345</ZipCode>
        </Address>	
        <Insurance>
        	<InsuranceInfo>	
            	<Status>Complete</Status>
             	<GroupNumber>21231</GroupNumber>
            	<MemberId>4445503</MemberId>
            </InsuranceInfo>
         </Insurance>
    </Patient>
    <Participant>  
        <Type>PROVIDER</Type>
        <Identifier>hwinston</Identifier>    
        <ProviderName>Mickey Wal</ProviderName>
    </Participant>
    <Copayment>
    	<Amount>23</Amount>
    </Copayment>
    <Balance>
        <DueBy>2016-12-23T00:00:00</DueBy>
        <Amount>23</Amount>
    </Balance>
 </Appointments>
</ns2:AppointmentData>
Note: Currently the schema allows for partners to post Insurance, Balance and Copayment information. However this information is currently not used in Medfusion and is future functionality that Medfusion plans to incorporate.
Sample Response
Response Header

202 OK
Content-Length:180
Content-Type: application/xml

Response Body – Successful Completion (Defined in ProcessingResponse.xsd)

<?xml version="1.0" encoding="UTF-8"?>
<ProcessingResponse xmlns:ns2="http://schema.intuit.com/health/appointmentsData/v1" 
    xmlns:ns3="http://schema.medfusion.com/appointmentsdata/v1">
   <DataJobId>652a26dc-2524-4ed2-9c58-6e7ea7384a2c</DataJobId>
   <MessageId>81e083a7-29c6-453d-864c-f6d8f3644eb5</MessageId>
   <ProcessingStatus>Successful</ProcessingStatus>
   <ResponseMessage></ResponseMessage>
</ProcessingResponse>

The “DataJobId” identifies the batch. The “MessageId” value is a unique identifier for this api message, and is intended to be used in future api calls to retrieve the message’s processing status.

Appointment Display API Overview

Appointment Display API Schema