Difference between revisions of "Template:Json Patients Block - Java"

From Updox API
Jump to: navigation, search
(Created page with " private Map<String,Object> BuildMessage() throws Exception { Map<String, Object> patient1 = new HashMap(); patient1.put("id", 123); // Currently not u...")

Revision as of 21:24, 11 December 2015

   private Map<String,Object> BuildMessage() throws Exception
   {
       Map<String, Object> patient1 = new HashMap();
       patient1.put("id", 123);  // Currently not used and can be ignored
       patient1.put("chartNumber", 234);
       patient1.put("internalId", 345);
       patient1.put("firstName", "firstName");
       patient1.put("middleName", "middleName");
       patient1.put("lastName", "lastName");
       patient1.put("sex", "male");
       patient1.put("address1", "address1");
       patient1.put("address2", "address2");
       patient1.put("city", "Columbus");
       patient1.put("state", "OH");
       patient1.put("zip5", "43017");
       patient1.put("dob", "1978-10-30");
       patient1.put("emailAddress", "valid@email.com");
       patient1.put("homePhone", "6141231234");
       patient1.put("workPhone", "6149879876");
       patient1.put("workExtension", "x112");
       patient1.put("mobileNumber", "6144564567");
       patient1.put("faxNumber", "6149879532");
       patient1.put("active", true);
       patient1.put("contactType", "patient");
       patient1.put("defaultProvider", "defaultProvider");
       patient1.put("maritalStatus", "Marital Status");
 
       Map<String, Object> primaryInsurance = new HashMap();
       primaryInsurance.put("companyName", "companyName");
       primaryInsurance.put("phoneNumber", "phoneNumber");
       primaryInsurance.put("address1", "address1");
       primaryInsurance.put("address2", "address2");
       primaryInsurance.put("city", "city");
       primaryInsurance.put("state", "state");
       primaryInsurance.put("zip", "zip");
       primaryInsurance.put("policyNumber", "policyNumber");
       primaryInsurance.put("groupNumber", "groupNumber");
       primaryInsurance.put("planName", "planName");
       primaryInsurance.put("groupName", "groupName");
       primaryInsurance.put("effectiveDate", "effectiveDate");
       primaryInsurance.put("expirationDate", "expirationDate");
       primaryInsurance.put("guarantorRelationship", "guarantorRelationship");
       primaryInsurance.put("guarantorName", "guarantorName");
       primaryInsurance.put("guarantorFirstName", "guarantorFirstName");
       primaryInsurance.put("guarantorMiddleName", "guarantorMiddleName");
       primaryInsurance.put("guarantorLastName", "guarantorLastName");
       primaryInsurance.put("guarantorDob", "guarantorDob");
       primaryInsurance.put("guarantorGender", "guarantorGender");
       primaryInsurance.put("copayAmount", "copayAmount");
 
       patient1.put("primaryInsurance", primaryInsurance);
 
       Map<String, Object> secondaryInsurance = new HashMap();
       secondaryInsurance.put("companyName", "companyName");
       secondaryInsurance.put("phoneNumber", "phoneNumber");
       secondaryInsurance.put("address1", "address1");
       secondaryInsurance.put("address2", "address2");
       secondaryInsurance.put("city", "city");
       secondaryInsurance.put("state", "state");
       secondaryInsurance.put("zip", "zip");
       secondaryInsurance.put("policyNumber", "policyNumber");
       secondaryInsurance.put("groupNumber", "groupNumber");
       secondaryInsurance.put("planName", "planName");
       secondaryInsurance.put("groupName", "groupName");
       secondaryInsurance.put("effectiveDate", "effectiveDate");
       secondaryInsurance.put("expirationDate", "expirationDate");
       secondaryInsurance.put("guarantorRelationship", "guarantorRelationship");
       secondaryInsurance.put("guarantorName", "guarantorName");
       secondaryInsurance.put("guarantorFirstName", "guarantorFirstName");
       secondaryInsurance.put("guarantorMiddleName", "guarantorMiddleName");
       secondaryInsurance.put("guarantorLastName", "guarantorLastName");
       secondaryInsurance.put("guarantorDob", "guarantorDob");
       secondaryInsurance.put("guarantorGender", "guarantorGender");
       secondaryInsurance.put("copayAmount", "copayAmount");
 
       patient1.put("secondaryInsurance", secondaryInsurance);
   
       List<String> patients = new ArrayList<>();
       eventNotificationIds.add(patient1);
       
       Map<String, Object> messageData = new HashMap();
       messageData.put("eventNotificationIds", eventNotificationIds);
       
       Map<String,String> authData = new HashMap();
       authData.put("applicationId", "vendorId");
       authData.put("applicationPassword", "vendorPassword");
       messageData.put("auth", authData);
       
       return messageData;
   }