Difference between revisions of "API Method MuMeasuresGet"

From Updox API
Jump to: navigation, search
Line 1: Line 1:
 +
 +
 
== Description ==
 
== Description ==
 
The following code samples describe the processes involved in obtaining Mu Measures
 
The following code samples describe the processes involved in obtaining Mu Measures
 +
 +
  
 
==  Prerequisites ==
 
==  Prerequisites ==
# This API call requires [http://updox.com/api-library-request-page/ Vendor-level credentials].  The credentials should be populated into the <code>applicationId</code> and <code>applicationPassword</code> fields of the <code>auth</code> block.
+
{{PreReq Vendor Credentials}}
 +
 
 +
 
 +
{{PreReq Account Identifier}}
 +
 
 +
 
  
 
== Code Samples ==
 
== Code Samples ==
Line 28: Line 37:
 
{{Base_Code_for_Consuming_API_Using_Java}}
 
{{Base_Code_for_Consuming_API_Using_Java}}
 
|}
 
|}
 
  
  
 
== Messages ==
 
== Messages ==
 +
=== Core 17 ===
 +
Gets unique list of patients within a set time-frame who have sent a message to any provider in the practice. Since all messages that originate on the practice portal are directed to the practice group inbox, any provider in the practice can see (and, thus, claim) the message in their numerator.
 +
 +
 
=== Destination Address ===
 
=== Destination Address ===
 
<div style="width:500px;">
 
<div style="width:500px;">
Line 55: Line 67:
  
  
=== Measures ===
+
=== Core 7.1 ===
 +
Gets continuity of care records for a practice within a set timeframe and record patient's ID and date sent for each
  
== Core 17 ==
+
=== Destination Address ===
Gets unique list of patients within a set time-frame who have sent a message to any provider in the practice. Since all messages that originate on the practice portal are directed to the practice group inbox, any provider in the practice can see (and, thus, claim) the message in their numerator.
+
<div style="width:500px;">
 +
  {{Base url api|userCreate|userCreate}}
 +
</div>
  
== Core 7.1 ==
+
=== Request JSON ===
Gets continuity of care records for a practice within a set timeframe and record patient's ID and date sent for each
+
<div style="width:500px;">
== Core 7.2 ==
+
{{Json Request User}}
 +
</div>
 +
 
 +
=== HTTP Response Status ===
 +
<div style="width:500px;">
 +
  200 OK
 +
</div>
 +
 
 +
=== Response JSON ===
 +
<div style="width:500px;">
 +
{{Json Response User}}
 +
</div>
 +
 
 +
 
 +
=== Core 7.2 ===
 
Gets a unique list of patients within a set time-frame who have viewed, downloaded, or transmitted a CCD* document, and stores that count as numerator.
 
Gets a unique list of patients within a set time-frame who have viewed, downloaded, or transmitted a CCD* document, and stores that count as numerator.
 +
 +
=== Destination Address ===
 +
<div style="width:500px;">
 +
  {{Base url api|userCreate|userCreate}}
 +
</div>
 +
 +
=== Request JSON ===
 +
<div style="width:500px;">
 +
{{Json Request User}}
 +
</div>
 +
 +
=== HTTP Response Status ===
 +
<div style="width:500px;">
 +
  200 OK
 +
</div>
 +
 +
=== Response JSON ===
 +
<div style="width:500px;">
 +
{{Json Response User}}
 +
</div>

Revision as of 11:49, 27 May 2014


Contents

Description

The following code samples describe the processes involved in obtaining Mu Measures


Prerequisites

1 This API call requires Vendor-level credentials. The credentials should be populated into the applicationId and applicationPassword fields of the auth block:

 {
   ...
   "auth": {
     "applicationId": "vendorId",
     "applicationPassword": "vendorPassword",
     "accountId": "",
     "userId": ""
   }
 }
 
 

2 This API call requires a Practice/Account-level identifier. The identifier should be populated into the accountId field of the auth block:

 {
   ...
   "auth": {
     "applicationId": "vendorId",
     "applicationPassword": "vendorPassword",
     "accountId": "practiceId",
     "userId": ""
   }
 }


Code Samples

Language Source Code Examples
C#
 public void TalkToUpdox() {
   string json = new JavaScriptSerializer().Serialize(new {
     userId = "newUserId",
     loginId = "newLoginId",
     loginPassword = "password",
     firstName = "Ima",  // required
     middleName" = "Joy",
     lastName = "Usertino", // required
     address1 = "94 N. High St",
     address2 = "Suite 100",
     city = "Dublin",
     state = "OH",
     postal = "43017",
     timeZone = "America/Chicago",
     active = "true",  //recommended, defaults to "false"
     provider = "false",
     directAddress = "practiceuser",
     auth = new {
       applicationId = "vendorId",
       applicationPassword = "vendorPassword",
       accountId = "accountId",
       userId = ""
     }
   });
   string url = "https://updoxqa.com/io/userCreate";
   SendReceiveJSON(json, url);
 }
 
 private void SendReceiveJSON(string json, string url)
 {
   var httpWebRequest = WebRequest.Create(url);
   httpWebRequest.ContentType = "application/json";
   httpWebRequest.Method = "POST";
   using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))
   {
     streamWriter.Write(json);
     streamWriter.Flush();
     streamWriter.Close();
     var httpResponse = (HttpWebResponse) httpWebRequest.GetResponse();
     using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
     {
       var result = streamReader.ReadToEnd();
     }
   }
 }
Java


   public void TalkToUpdox() throws Exception {
       String uri = "https://updoxqa.com/io/userCreate";
       ObjectMapper mapper = new ObjectMapper();
       Map<String,Object> messageData = BuildMessage();
       String jsonData = mapper.writeValueAsString(messageData);
       HttpResponse httpResponse = SendReceiveJSON(jsonData, uri);
       HttpEntity responseEntity = httpResponse.getEntity();
       String response = EntityUtils.toString(responseEntity);
       JsonNode actualObj = mapper.readTree(response);
 
       System.out.println(actualObj.get("responseCode"));
       System.out.println(actualObj.get("responseMessage"));
   }
 
   private Map<String,Object> BuildMessage() throws Exception
   {
       Map<String,Object> messageData = new HashMap();
       messageData.put("loginId","newLoginId");
       messageData.put("loginPassword","password");
       messageData.put("firstName", "Ima");  // required
       messageData.put("middleName", "Joy");
       messageData.put("lastName", "Usertino"); // required
       messageData.put("address1", "94 N. High St");
       messageData.put("address2", "Suite 100");
       messageData.put("city", "Dublin");
       messageData.put("state", "OH");
       messageData.put("postal", "43017");
       messageData.put("timeZone", "America/Chicago");
       messageData.put("active","true"); // recommended, defaults to "false"
       messageData.put("provider", "false");
       messageData.put("directAddress", "practiceuser");
 
       authData.put("applicationId", "vendorId");
       authData.put("applicationPassword", "vendorPassword");
       authData.put("accountId", "accountId");
 
       return messageData;
   }
 
   private HttpResponse SendReceiveJSON(String jsonData, String uri) throws Exception {
       HttpClient httpClient = new DefaultHttpClient();
       HttpResponse response = null;
       StringEntity params = new StringEntity(jsonData);
       try {
           HttpPost request = new HttpPost(uri);
           request.addHeader("content-type", "application/json");
           request.setEntity(params);
           response = httpClient.execute(request);
       } catch (Exception ex) {
           // handle exception here
       } finally {
           httpClient.getConnectionManager().shutdown();
       }
       return response;
   }


Messages

Core 17

Gets unique list of patients within a set time-frame who have sent a message to any provider in the practice. Since all messages that originate on the practice portal are directed to the practice group inbox, any provider in the practice can see (and, thus, claim) the message in their numerator.


Destination Address

 https://updoxqa.com/io/userCreate

Request JSON

{

   "userId": "newUserId",
   "loginId": "newLoginId",
   "loginPassword": "password",
   "firstName": "Iam",
   "middleName": "Joy",
   "lastName": "Usertino",
   "address1": "94 N High Street",
   "address2": "Suite 100",
   "city": "Dublin",
   "state": "OH",
   "postal": "43017",
   "timeZone": "America/Chicago",
   "active": "true",
   "provider": "false",
   "directAddress": "practiceuser",
   "auth": {
       "applicationId": "vendorId",
       "applicationPassword": "vendorPassword",
       "accountId": "accountId",
       "userId": ""
   }

}

HTTP Response Status

 200 OK

Response JSON

 {
   "successful": true,
   "responseMessage": "OK",
   "responseCode": 2000,
   "userId": "newUserId",
   "action": "create"
 }



Core 7.1

Gets continuity of care records for a practice within a set timeframe and record patient's ID and date sent for each

Destination Address

 https://updoxqa.com/io/userCreate

Request JSON

{

   "userId": "newUserId",
   "loginId": "newLoginId",
   "loginPassword": "password",
   "firstName": "Iam",
   "middleName": "Joy",
   "lastName": "Usertino",
   "address1": "94 N High Street",
   "address2": "Suite 100",
   "city": "Dublin",
   "state": "OH",
   "postal": "43017",
   "timeZone": "America/Chicago",
   "active": "true",
   "provider": "false",
   "directAddress": "practiceuser",
   "auth": {
       "applicationId": "vendorId",
       "applicationPassword": "vendorPassword",
       "accountId": "accountId",
       "userId": ""
   }

}

HTTP Response Status

 200 OK

Response JSON

 {
   "successful": true,
   "responseMessage": "OK",
   "responseCode": 2000,
   "userId": "newUserId",
   "action": "create"
 }


Core 7.2

Gets a unique list of patients within a set time-frame who have viewed, downloaded, or transmitted a CCD* document, and stores that count as numerator.

Destination Address

 https://updoxqa.com/io/userCreate

Request JSON

{

   "userId": "newUserId",
   "loginId": "newLoginId",
   "loginPassword": "password",
   "firstName": "Iam",
   "middleName": "Joy",
   "lastName": "Usertino",
   "address1": "94 N High Street",
   "address2": "Suite 100",
   "city": "Dublin",
   "state": "OH",
   "postal": "43017",
   "timeZone": "America/Chicago",
   "active": "true",
   "provider": "false",
   "directAddress": "practiceuser",
   "auth": {
       "applicationId": "vendorId",
       "applicationPassword": "vendorPassword",
       "accountId": "accountId",
       "userId": ""
   }

}

HTTP Response Status

 200 OK

Response JSON

 {
   "successful": true,
   "responseMessage": "OK",
   "responseCode": 2000,
   "userId": "newUserId",
   "action": "create"
 }