[507] | 1 | package gov.hhs.fha.nhinc.repository.service;
|
---|
| 2 |
|
---|
| 3 | import gov.hhs.fha.nhinc.repository.model.Document;
|
---|
| 4 | import gov.hhs.fha.nhinc.repository.model.DocumentQueryParams;
|
---|
| 5 | import gov.hhs.fha.nhinc.repository.model.EventCode;
|
---|
| 6 | import gov.hhs.fha.nhinc.util.hash.SHA1HashCode;
|
---|
| 7 | import java.text.SimpleDateFormat;
|
---|
| 8 | import java.util.ArrayList;
|
---|
| 9 | import java.util.Date;
|
---|
| 10 | import java.util.HashSet;
|
---|
| 11 | import java.util.List;
|
---|
| 12 | import java.util.Set;
|
---|
| 13 | import org.junit.Test;
|
---|
| 14 | import static org.junit.Assert.*;
|
---|
| 15 |
|
---|
| 16 | /**
|
---|
| 17 | * Test case for the DocumentService class
|
---|
| 18 | *
|
---|
| 19 | * @author Neil Webb
|
---|
| 20 | */
|
---|
| 21 | public class DocumentServiceTest
|
---|
| 22 | {
|
---|
| 23 | /**
|
---|
| 24 | * Test of DocumentService operations.
|
---|
| 25 | */
|
---|
| 26 | @Test
|
---|
| 27 | public void testDocumentOperations()
|
---|
| 28 | {
|
---|
| 29 | System.out.println("Start testDocumentOperations");
|
---|
| 30 | try
|
---|
| 31 | {
|
---|
| 32 | DocumentService docService = new DocumentService();
|
---|
| 33 | Document document = null;
|
---|
| 34 |
|
---|
| 35 | // Insert document - minimal
|
---|
| 36 | document = new Document();
|
---|
| 37 | Long documentId = null;
|
---|
| 38 | String documentUniqueId = "1234abcd";
|
---|
| 39 |
|
---|
| 40 | document.setDocumentid(documentId);
|
---|
| 41 | document.setDocumentUniqueId(documentUniqueId);
|
---|
| 42 |
|
---|
| 43 | docService.saveDocument(document);
|
---|
| 44 | documentId = document.getDocumentid();
|
---|
| 45 |
|
---|
| 46 | // Retrieve initial insert
|
---|
| 47 | Document retrieved = docService.getDocument(documentId);
|
---|
| 48 | assertNotNull("Retrieved doc - minmal was null", retrieved);
|
---|
| 49 | assertNotNull("After insert - Document id null", documentId);
|
---|
| 50 | assertEquals("After insert - Document unique id", documentUniqueId, retrieved.getDocumentUniqueId());
|
---|
| 51 | assertFalse("After insert - Persistent flag", retrieved.isPersistent());
|
---|
| 52 |
|
---|
| 53 | // Update
|
---|
| 54 | documentUniqueId = "1234abcdupdated";
|
---|
| 55 | String documentTitle = "Doc title";
|
---|
| 56 | String authorPerson = "authorPerson";
|
---|
| 57 | String authorInstitution = "authorInstitution";
|
---|
| 58 | String authorRole = "authorRole";
|
---|
| 59 | String authorSpecialty = "authorSpecialty";
|
---|
| 60 | String availablityStatus = "availablityStatus";
|
---|
| 61 | String classCode = "classCode";
|
---|
| 62 | String classCodeScheme = "classCodeScheme";
|
---|
| 63 | String classCodeDisplayName = "classCodeDisplayName";
|
---|
| 64 | String confidentialityCode = "confidentialityCode";
|
---|
| 65 | String confidentialityCodeScheme = "confidentialityCodeScheme";
|
---|
| 66 | String confidentialityCodeDisplayName = "confidentialityCodeDisplayName";
|
---|
| 67 | Date creationTime = new SimpleDateFormat("yyyyMMddhhmmss").parse("20040404040404");
|
---|
| 68 | String formatCode = "formatCode";
|
---|
| 69 | String formatCodeScheme = "formatCodeScheme";
|
---|
| 70 | String formatCodeDisplayName = "formatCodeDisplayName";
|
---|
| 71 | String patientId = "patientId";
|
---|
| 72 | Date serviceStartTime = new SimpleDateFormat("yyyyMMddhhmmss").parse("20050505050505");
|
---|
| 73 | Date serviceStopTime = new SimpleDateFormat("yyyyMMddhhmmss").parse("20060606060606");
|
---|
| 74 | String status = "status";
|
---|
| 75 | String comments = "comments";
|
---|
| 76 | String hash = null; //"hash";
|
---|
| 77 | String facilityCode = "facilityCode";
|
---|
| 78 | String facilityCodeScheme = "facilityCodeScheme";
|
---|
| 79 | String facilityCodeDisplayName = "facilityCodeDisplayName";
|
---|
| 80 | String intendedRecipientPerson = "intendedRecipientPerson";
|
---|
| 81 | String intendedRecipientOrganization = "intendedRecipientOrganization";
|
---|
| 82 | String languageCode = "languageCode";
|
---|
| 83 | String legalAuthenticator = "legalAuthenticator";
|
---|
| 84 | String mimeType = "mimeType";
|
---|
| 85 | String parentDocumentId = "parentDocumentId";
|
---|
| 86 | String parentDocumentRelationship = "parentDocumentRelationship";
|
---|
| 87 | String practiceSetting = "practiceSetting";
|
---|
| 88 | String practiceSettingScheme = "practiceSettingScheme";
|
---|
| 89 | String practiceSettingDisplayName = "practiceSettingDisplayName";
|
---|
| 90 | Integer size = new Integer(8989);
|
---|
| 91 | String sourcePatientId = "sourcePatientId";
|
---|
| 92 | String pid3 = "pid3";
|
---|
| 93 | String pid5 = "pid5";
|
---|
| 94 | String pid8 = "pid8";
|
---|
| 95 | String pid7 = "pid7";
|
---|
| 96 | String pid11 = "pid11";
|
---|
| 97 | String typeCode = "typeCode";
|
---|
| 98 | String typeCodeScheme = "typeCodeScheme";
|
---|
| 99 | String typeCodeDisplayName = "typeCodeDisplayName";
|
---|
| 100 | String documentUri = "documentUri";
|
---|
| 101 | // String rawData = "rawData";
|
---|
| 102 | String rawData = sampleC32();
|
---|
| 103 | String sCompareHash = SHA1HashCode.calculateSHA1(rawData); // Calculate the hash code for comparison later...
|
---|
| 104 |
|
---|
| 105 | retrieved.setDocumentUniqueId(documentUniqueId);
|
---|
| 106 | retrieved.setDocumentTitle(documentTitle);
|
---|
| 107 | retrieved.setAuthorPerson(authorPerson);
|
---|
| 108 | retrieved.setAuthorInstitution(authorInstitution);
|
---|
| 109 | retrieved.setAuthorRole(authorRole);
|
---|
| 110 | retrieved.setAuthorSpecialty(authorSpecialty);
|
---|
| 111 | retrieved.setAvailablityStatus(availablityStatus);
|
---|
| 112 | retrieved.setClassCode(classCode);
|
---|
| 113 | retrieved.setClassCodeScheme(classCodeScheme);
|
---|
| 114 | retrieved.setClassCodeDisplayName(classCodeDisplayName);
|
---|
| 115 | retrieved.setConfidentialityCode(confidentialityCode);
|
---|
| 116 | retrieved.setConfidentialityCodeScheme(confidentialityCodeScheme);
|
---|
| 117 | retrieved.setConfidentialityCodeDisplayName(confidentialityCodeDisplayName);
|
---|
| 118 | retrieved.setCreationTime(creationTime);
|
---|
| 119 | retrieved.setFormatCode(formatCode);
|
---|
| 120 | retrieved.setFormatCodeScheme(formatCodeScheme);
|
---|
| 121 | retrieved.setFormatCodeDisplayName(formatCodeDisplayName);
|
---|
| 122 | retrieved.setPatientId(patientId);
|
---|
| 123 | retrieved.setServiceStartTime(serviceStartTime);
|
---|
| 124 | retrieved.setServiceStopTime(serviceStopTime);
|
---|
| 125 | retrieved.setStatus(status);
|
---|
| 126 | retrieved.setComments(comments);
|
---|
| 127 | retrieved.setHash(hash);
|
---|
| 128 | retrieved.setFacilityCode(facilityCode);
|
---|
| 129 | retrieved.setFacilityCodeScheme(facilityCodeScheme);
|
---|
| 130 | retrieved.setFacilityCodeDisplayName(facilityCodeDisplayName);
|
---|
| 131 | retrieved.setIntendedRecipientPerson(intendedRecipientPerson);
|
---|
| 132 | retrieved.setIntendedRecipientOrganization(intendedRecipientOrganization);
|
---|
| 133 | retrieved.setLanguageCode(languageCode);
|
---|
| 134 | retrieved.setLegalAuthenticator(legalAuthenticator);
|
---|
| 135 | retrieved.setMimeType(mimeType);
|
---|
| 136 | retrieved.setParentDocumentId(parentDocumentId);
|
---|
| 137 | retrieved.setParentDocumentRelationship(parentDocumentRelationship);
|
---|
| 138 | retrieved.setPracticeSetting(practiceSetting);
|
---|
| 139 | retrieved.setPracticeSettingScheme(practiceSettingScheme);
|
---|
| 140 | retrieved.setPracticeSettingDisplayName(practiceSettingDisplayName);
|
---|
| 141 | retrieved.setSize(size);
|
---|
| 142 | retrieved.setSourcePatientId(sourcePatientId);
|
---|
| 143 | retrieved.setPid3(pid3);
|
---|
| 144 | retrieved.setPid5(pid5);
|
---|
| 145 | retrieved.setPid8(pid8);
|
---|
| 146 | retrieved.setPid7(pid7);
|
---|
| 147 | retrieved.setPid11(pid11);
|
---|
| 148 | retrieved.setTypeCode(typeCode);
|
---|
| 149 | retrieved.setTypeCodeScheme(typeCodeScheme);
|
---|
| 150 | retrieved.setTypeCodeDisplayName(typeCodeDisplayName);
|
---|
| 151 | retrieved.setDocumentUri(documentUri);
|
---|
| 152 | retrieved.setRawData(rawData.getBytes());
|
---|
| 153 | retrieved.setPersistent(true);
|
---|
| 154 |
|
---|
| 155 | Set<EventCode> eventCodes = new HashSet<EventCode>();
|
---|
| 156 | EventCode code1 = new EventCode();
|
---|
| 157 | String eventCode1 = "eventCode1";
|
---|
| 158 | String eventCodeScheme1 = "eventCodeScheme1";
|
---|
| 159 | String eventCodeDisplayName1 = "eventCodeDisplayName1";
|
---|
| 160 | code1.setEventCode(eventCode1);
|
---|
| 161 | code1.setEventCodeScheme(eventCodeScheme1);
|
---|
| 162 | code1.setEventCodeDisplayName(eventCodeDisplayName1);
|
---|
| 163 | code1.setDocument(retrieved);
|
---|
| 164 | eventCodes.add(code1);
|
---|
| 165 | EventCode code2 = new EventCode();
|
---|
| 166 | String eventCode2 = "eventCode2";
|
---|
| 167 | String eventCodeScheme2 = "eventCodeScheme2";
|
---|
| 168 | String eventCodeDisplayName2 = "eventCodeDisplayName2";
|
---|
| 169 | code2.setEventCode(eventCode2);
|
---|
| 170 | code2.setEventCodeScheme(eventCodeScheme2);
|
---|
| 171 | code2.setEventCodeDisplayName(eventCodeDisplayName2);
|
---|
| 172 | code2.setDocument(retrieved);
|
---|
| 173 | eventCodes.add(code2);
|
---|
| 174 | retrieved.setEventCodes(eventCodes);
|
---|
| 175 |
|
---|
| 176 | docService.saveDocument(retrieved);
|
---|
| 177 |
|
---|
| 178 | // Retrieve updated
|
---|
| 179 | retrieved = docService.getDocument(documentId);
|
---|
| 180 | assertNotNull("Retrieved doc - updated was null", retrieved);
|
---|
| 181 | assertEquals("After update - Document id", documentId, retrieved.getDocumentid());
|
---|
| 182 | assertEquals("After update - Document unique id", documentUniqueId, retrieved.getDocumentUniqueId());
|
---|
| 183 | assertEquals("After update - authorInstitution", authorInstitution, retrieved.getAuthorInstitution());
|
---|
| 184 | assertEquals("After update - authorRole", authorRole, retrieved.getAuthorRole());
|
---|
| 185 | assertEquals("After update - authorSpecialty", authorSpecialty, retrieved.getAuthorSpecialty());
|
---|
| 186 | assertEquals("After update - availablityStatus", availablityStatus, retrieved.getAvailablityStatus());
|
---|
| 187 | assertEquals("After update - classCode", classCode, retrieved.getClassCode());
|
---|
| 188 | assertEquals("After update - classCodeScheme", classCodeScheme, retrieved.getClassCodeScheme());
|
---|
| 189 | assertEquals("After update - classCodeDisplayName", classCodeDisplayName, retrieved.getClassCodeDisplayName());
|
---|
| 190 | assertEquals("After update - confidentialityCode", confidentialityCode, retrieved.getConfidentialityCode());
|
---|
| 191 | assertEquals("After update - confidentialityCodeScheme", confidentialityCodeScheme, retrieved.getConfidentialityCodeScheme());
|
---|
| 192 | assertEquals("After update - confidentialityCodeDisplayName", confidentialityCodeDisplayName, retrieved.getConfidentialityCodeDisplayName());
|
---|
| 193 | assertEquals("After update - creationTime", creationTime, retrieved.getCreationTime());
|
---|
| 194 | assertEquals("After update - formatCode", formatCode, retrieved.getFormatCode());
|
---|
| 195 | assertEquals("After update - formatCodeScheme", formatCodeScheme, retrieved.getFormatCodeScheme());
|
---|
| 196 | assertEquals("After update - formatCodeDisplayName", formatCodeDisplayName, retrieved.getFormatCodeDisplayName());
|
---|
| 197 | assertEquals("After update - patientId", patientId, retrieved.getPatientId());
|
---|
| 198 | assertEquals("After update - serviceStartTime", serviceStartTime, retrieved.getServiceStartTime());
|
---|
| 199 | assertEquals("After update - serviceStopTime", serviceStopTime, retrieved.getServiceStopTime());
|
---|
| 200 | assertEquals("After update - status", status, retrieved.getStatus());
|
---|
| 201 | assertEquals("After update - comments", comments, retrieved.getComments());
|
---|
| 202 | assertEquals("After update - hash", sCompareHash, retrieved.getHash());
|
---|
| 203 | assertEquals("After update - facilityCode", facilityCode, retrieved.getFacilityCode());
|
---|
| 204 | assertEquals("After update - facilityCodeScheme", facilityCodeScheme, retrieved.getFacilityCodeScheme());
|
---|
| 205 | assertEquals("After update - facilityCodeDisplayName", facilityCodeDisplayName, retrieved.getFacilityCodeDisplayName());
|
---|
| 206 | assertEquals("After update - intendedRecipientPerson", intendedRecipientPerson, retrieved.getIntendedRecipientPerson());
|
---|
| 207 | assertEquals("After update - intendedRecipientOrganization", intendedRecipientOrganization, retrieved.getIntendedRecipientOrganization());
|
---|
| 208 | assertEquals("After update - languageCode", languageCode, retrieved.getLanguageCode());
|
---|
| 209 | assertEquals("After update - legalAuthenticator", legalAuthenticator, retrieved.getLegalAuthenticator());
|
---|
| 210 | assertEquals("After update - mimeType", mimeType, retrieved.getMimeType());
|
---|
| 211 | assertEquals("After update - parentDocumentId", parentDocumentId, retrieved.getParentDocumentId());
|
---|
| 212 | assertEquals("After update - parentDocumentRelationship", parentDocumentRelationship, retrieved.getParentDocumentRelationship());
|
---|
| 213 | assertEquals("After update - practiceSetting", practiceSetting, retrieved.getPracticeSetting());
|
---|
| 214 | assertEquals("After update - practiceSettingScheme", practiceSettingScheme, retrieved.getPracticeSettingScheme());
|
---|
| 215 | assertEquals("After update - practiceSettingDisplayName", practiceSettingDisplayName, retrieved.getPracticeSettingDisplayName());
|
---|
| 216 | assertEquals("After update - size", size, retrieved.getSize());
|
---|
| 217 | assertEquals("After update - sourcePatientId", sourcePatientId, retrieved.getSourcePatientId());
|
---|
| 218 | assertEquals("After update - pid3", pid3, retrieved.getPid3());
|
---|
| 219 | assertEquals("After update - pid5", pid5, retrieved.getPid5());
|
---|
| 220 | assertEquals("After update - pid8", pid8, retrieved.getPid8());
|
---|
| 221 | assertEquals("After update - pid7", pid7, retrieved.getPid7());
|
---|
| 222 | assertEquals("After update - pid11", pid11, retrieved.getPid11());
|
---|
| 223 | assertEquals("After update - typeCode", typeCode, retrieved.getTypeCode());
|
---|
| 224 | assertEquals("After update - typeCodeScheme", typeCodeScheme, retrieved.getTypeCodeScheme());
|
---|
| 225 | assertEquals("After update - typeCodeDisplayName", typeCodeDisplayName, retrieved.getTypeCodeDisplayName());
|
---|
| 226 | assertEquals("After update - documentUri", documentUri, retrieved.getDocumentUri());
|
---|
| 227 | assertEquals("After update - rawData", rawData, new String(retrieved.getRawData()));
|
---|
| 228 | assertTrue("After update - persistent flag", retrieved.isPersistent());
|
---|
| 229 |
|
---|
| 230 | eventCodes = retrieved.getEventCodes();
|
---|
| 231 | assertNotNull("After update - audit codes null", eventCodes);
|
---|
| 232 | assertEquals("After update - audit codes size", 2, eventCodes.size());
|
---|
| 233 |
|
---|
| 234 | // Iterator<EventCode> iter = eventCodes.iterator();
|
---|
| 235 | // while(iter.hasNext())
|
---|
| 236 | // {
|
---|
| 237 | // EventCode code = iter.next();
|
---|
| 238 | // assertNotNull("After insert - contained event code was null", code);
|
---|
| 239 | // assertNotNull("After insert - event code id was null", code.getEventCodeId());
|
---|
| 240 | // assertEquals("After insert - eventCode1", eventCode1, code.getEventCode());
|
---|
| 241 | // assertEquals("After insert - eventCodeScheme1", eventCodeScheme1, code.getEventCodeScheme());
|
---|
| 242 | // assertEquals("After insert - eventCodeDisplayName1", eventCodeDisplayName1, code.getEventCodeDisplayName());
|
---|
| 243 | // }
|
---|
| 244 |
|
---|
| 245 | // Query by patient id only
|
---|
| 246 | DocumentQueryParams queryParams = buildQueryParams(patientId, null, null, null, null, null, null, null, null, null, null);
|
---|
| 247 | List<Document> queryResults = docService.documentQuery(queryParams);
|
---|
| 248 | assertNotNull("Query by patient id results null", queryResults);
|
---|
| 249 | assertFalse("Query by patient id results empty", queryResults.isEmpty());
|
---|
| 250 |
|
---|
| 251 | // Query by class code
|
---|
| 252 | queryParams = buildQueryParams(patientId, classCode, null, null, null, null, null, null, null, null, null);
|
---|
| 253 | queryResults = docService.documentQuery(queryParams);
|
---|
| 254 | assertNotNull("Query by class code results null", queryResults);
|
---|
| 255 | assertFalse("Query by class code results empty", queryResults.isEmpty());
|
---|
| 256 |
|
---|
| 257 | // Query by class code scheme
|
---|
| 258 | queryParams = buildQueryParams(patientId, null, classCodeScheme, null, null, null, null, null, null, null, null);
|
---|
| 259 | queryResults = docService.documentQuery(queryParams);
|
---|
| 260 | assertNotNull("Query by class code scheme results null", queryResults);
|
---|
| 261 | assertFalse("Query by class code scheme results empty", queryResults.isEmpty());
|
---|
| 262 |
|
---|
| 263 | // Query by creation date from
|
---|
| 264 | Date creationTimeFrom = new SimpleDateFormat("MM/dd/yyyy.HH:mm:ss").parse("04/04/2004.04:04:03");
|
---|
| 265 | queryParams = buildQueryParams(patientId, null, null, creationTimeFrom, null, null, null, null, null, null, null);
|
---|
| 266 | queryResults = docService.documentQuery(queryParams);
|
---|
| 267 | assertNotNull("Query by creation date from null results null", queryResults);
|
---|
| 268 | assertFalse("Query by creation date from results empty", queryResults.isEmpty());
|
---|
| 269 |
|
---|
| 270 | // Query by creation date to
|
---|
| 271 | Date creationTimeTo = new SimpleDateFormat("MM/dd/yyyy.HH:mm:ss").parse("04/04/2004.04:04:05");
|
---|
| 272 | queryParams = buildQueryParams(patientId, null, null, null, creationTimeTo, null, null, null, null, null, null);
|
---|
| 273 | queryResults = docService.documentQuery(queryParams);
|
---|
| 274 | assertNotNull("Query by creation date to results null", queryResults);
|
---|
| 275 | assertFalse("Query by creation date to results empty", queryResults.isEmpty());
|
---|
| 276 |
|
---|
| 277 | // Query by creation date from and to
|
---|
| 278 | queryParams = buildQueryParams(patientId, null, null, creationTimeFrom, creationTimeTo, null, null, null, null, null, null);
|
---|
| 279 | queryResults = docService.documentQuery(queryParams);
|
---|
| 280 | assertNotNull("Query by creation date from and to results null", queryResults);
|
---|
| 281 | assertFalse("Query by creation date from and to results empty", queryResults.isEmpty());
|
---|
| 282 |
|
---|
| 283 | // Query by service start date from
|
---|
| 284 | Date serviceStartTimeFrom = new SimpleDateFormat("yyyyMMddhhmmss").parse("20050505050504");
|
---|
| 285 | queryParams = buildQueryParams(patientId, null, null, null, null, serviceStartTimeFrom, null, null, null, null, null);
|
---|
| 286 | queryResults = docService.documentQuery(queryParams);
|
---|
| 287 | assertNotNull("Query by service start date from results null", queryResults);
|
---|
| 288 | assertFalse("Query by service start date from results empty", queryResults.isEmpty());
|
---|
| 289 |
|
---|
| 290 | // Query by service start date to
|
---|
| 291 | Date serviceStartTimeTo = new SimpleDateFormat("yyyyMMddhhmmss").parse("20050505050506");
|
---|
| 292 | queryParams = buildQueryParams(patientId, null, null, null, null, null, serviceStartTimeTo, null, null, null, null);
|
---|
| 293 | queryResults = docService.documentQuery(queryParams);
|
---|
| 294 | assertNotNull("Query by service start date to results null", queryResults);
|
---|
| 295 | assertFalse("Query by service start date to results empty", queryResults.isEmpty());
|
---|
| 296 |
|
---|
| 297 | // Query by service start date from and to
|
---|
| 298 | queryParams = buildQueryParams(patientId, null, null, null, null, serviceStartTimeFrom, serviceStartTimeTo, null, null, null, null);
|
---|
| 299 | queryResults = docService.documentQuery(queryParams);
|
---|
| 300 | assertNotNull("Query by service start date from and to results null", queryResults);
|
---|
| 301 | assertFalse("Query by service start date from and to results empty", queryResults.isEmpty());
|
---|
| 302 |
|
---|
| 303 | // Query by service stop time from
|
---|
| 304 | Date serviceStopTimeFrom = new SimpleDateFormat("yyyyMMddhhmmss").parse("20060606060605");
|
---|
| 305 | queryParams = buildQueryParams(patientId, null, null, null, null, null, null, serviceStopTimeFrom, null, null, null);
|
---|
| 306 | queryResults = docService.documentQuery(queryParams);
|
---|
| 307 | assertNotNull("Query by service stop time from results null", queryResults);
|
---|
| 308 | assertFalse("Query by service stop time from results empty", queryResults.isEmpty());
|
---|
| 309 |
|
---|
| 310 | // Query by service stop time to
|
---|
| 311 | Date serviceStopTimeTo = new SimpleDateFormat("yyyyMMddhhmmss").parse("20060606060607");
|
---|
| 312 | queryParams = buildQueryParams(patientId, null, null, null, null, null, null, null, serviceStopTimeTo, null, null);
|
---|
| 313 | queryResults = docService.documentQuery(queryParams);
|
---|
| 314 | assertNotNull("Query by service stop time to results null", queryResults);
|
---|
| 315 | assertFalse("Query by service stop time to results empty", queryResults.isEmpty());
|
---|
| 316 |
|
---|
| 317 | // Query by service stop time from and to
|
---|
| 318 | queryParams = buildQueryParams(patientId, null, null, null, null, null, null, serviceStopTimeFrom, serviceStopTimeTo, null, null);
|
---|
| 319 | queryResults = docService.documentQuery(queryParams);
|
---|
| 320 | assertNotNull("Query by service stop time from and to results null", queryResults);
|
---|
| 321 | assertFalse("Query by service stop time from and to results empty", queryResults.isEmpty());
|
---|
| 322 |
|
---|
| 323 | // Query by status
|
---|
| 324 | queryParams = buildQueryParams(patientId, null, null, null, null, null, null, null, null, status, null);
|
---|
| 325 | queryResults = docService.documentQuery(queryParams);
|
---|
| 326 | assertNotNull("Query by status results null", queryResults);
|
---|
| 327 | assertFalse("Query by status results empty", queryResults.isEmpty());
|
---|
| 328 |
|
---|
| 329 | // Query by document unique id
|
---|
| 330 | queryParams = buildQueryParams(null, null, null, null, null, null, null, null, null, null, documentUniqueId);
|
---|
| 331 | queryResults = docService.documentQuery(queryParams);
|
---|
| 332 | assertNotNull("Query by document unique id results null", queryResults);
|
---|
| 333 | assertFalse("Query by document unique id results empty", queryResults.isEmpty());
|
---|
| 334 |
|
---|
| 335 | // Query by all parameters
|
---|
| 336 | queryParams = buildQueryParams(patientId, classCode, classCodeScheme, creationTimeFrom, creationTimeTo, serviceStartTimeFrom, serviceStartTimeTo, serviceStopTimeFrom, serviceStopTimeTo, status, documentUniqueId);
|
---|
| 337 | queryResults = docService.documentQuery(queryParams);
|
---|
| 338 | assertNotNull("Query by all parameters results null", queryResults);
|
---|
| 339 | assertFalse("Query by all parameters results empty", queryResults.isEmpty());
|
---|
| 340 |
|
---|
| 341 | // Query with invalid patient id - Should return null or empty list - not exception
|
---|
| 342 | queryParams = buildQueryParams("invalidpatientid", classCode, classCodeScheme, creationTimeFrom, creationTimeTo, serviceStartTimeFrom, serviceStartTimeTo, serviceStopTimeFrom, serviceStopTimeTo, status, documentUniqueId);
|
---|
| 343 | queryResults = docService.documentQuery(queryParams);
|
---|
| 344 | assertTrue("Query using invalid patient id not empty", ((queryResults == null) || (queryResults.isEmpty())));
|
---|
| 345 |
|
---|
| 346 | // Query by creation date from (inclusive)
|
---|
| 347 | queryParams = buildQueryParams(patientId, null, null, creationTime, null, null, null, null, null, null, null);
|
---|
| 348 | queryResults = docService.documentQuery(queryParams);
|
---|
| 349 | assertNotNull("Query by creation date from (inclusive) results null", queryResults);
|
---|
| 350 | assertFalse("Query by creation date from (inclusive) results empty", queryResults.isEmpty());
|
---|
| 351 |
|
---|
| 352 | // Delete
|
---|
| 353 | docService.deleteDocument(retrieved);
|
---|
| 354 | retrieved = docService.getDocument(documentId);
|
---|
| 355 | assertNull("Document not null after delete", retrieved);
|
---|
| 356 |
|
---|
| 357 | }
|
---|
| 358 | catch (Throwable t)
|
---|
| 359 | {
|
---|
| 360 | t.printStackTrace();
|
---|
| 361 | fail("testDocumentOperations: " + t.getMessage());
|
---|
| 362 | }
|
---|
| 363 | System.out.println("End testDocumentOperations");
|
---|
| 364 | }
|
---|
| 365 |
|
---|
| 366 | private DocumentQueryParams buildQueryParams(String patientId, String classCode, String classCodeScheme, Date creationTimeFrom, Date creationTimeTo, Date serviceStartTimeFrom, Date serviceStartTimeTo, Date serviceStopTimeFrom, Date serviceStopTimeTo, String status, String documentUniqueId)
|
---|
| 367 | {
|
---|
| 368 | DocumentQueryParams params = new DocumentQueryParams();
|
---|
| 369 |
|
---|
| 370 | params.setPatientId(patientId);
|
---|
| 371 | if(classCode != null)
|
---|
| 372 | {
|
---|
| 373 | List<String> classCodes = new ArrayList<String>();
|
---|
| 374 | classCodes.add(classCode);
|
---|
| 375 | params.setClassCodes(classCodes);
|
---|
| 376 | }
|
---|
| 377 | params.setClassCodeScheme(classCodeScheme);
|
---|
| 378 | params.setCreationTimeFrom(creationTimeFrom);
|
---|
| 379 | params.setCreationTimeTo(creationTimeTo);
|
---|
| 380 | params.setServiceStartTimeFrom(serviceStartTimeFrom);
|
---|
| 381 | params.setServiceStartTimeTo(serviceStartTimeTo);
|
---|
| 382 | params.setServiceStopTimeFrom(serviceStopTimeFrom);
|
---|
| 383 | params.setServiceStopTimeTo(serviceStopTimeTo);
|
---|
| 384 | if(status != null)
|
---|
| 385 | {
|
---|
| 386 | List<String> statuses = new ArrayList<String>();
|
---|
| 387 | statuses.add(status);
|
---|
| 388 | params.setStatuses(statuses);
|
---|
| 389 | }
|
---|
| 390 | if (documentUniqueId != null)
|
---|
| 391 | {
|
---|
| 392 | List<String> documentUniqueIds = new ArrayList<String>();
|
---|
| 393 | documentUniqueIds.add(documentUniqueId);
|
---|
| 394 | params.setDocumentUniqueId(documentUniqueIds);
|
---|
| 395 | }
|
---|
| 396 |
|
---|
| 397 | return params;
|
---|
| 398 | }
|
---|
| 399 |
|
---|
| 400 | private String sampleC32()
|
---|
| 401 | {
|
---|
| 402 | StringBuffer sb = new StringBuffer();
|
---|
| 403 |
|
---|
| 404 | sb.append("<ClinicalDocument xsi:schemaLocation=\"urn:hl7-org:v3 http://xreg2.nist.gov:8080/hitspValidation/schema/cdar2c32/infrastructure/cda/C32_CDA.xsd\" xmlns:sdtc=\"urn:hl7-org:sdtc\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"urn:hl7-org:v3\">");
|
---|
| 405 | sb.append(" <typeId extension=\"POCD_HD000040\" root=\"2.16.840.1.113883.1.3\"/>");
|
---|
| 406 | sb.append(" <templateId assigningAuthorityName=\"CDA/R2\" root=\"2.16.840.1.113883.3.27.1776\"/>");
|
---|
| 407 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1\"/>");
|
---|
| 408 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.1\"/>");
|
---|
| 409 | sb.append(" <id extension=\"Laika C32 Test\" assigningAuthorityName=\"Laika: An Open Source EHR Testing Framework projectlaika.org\" root=\"2.16.840.1.113883.3.72\"/>");
|
---|
| 410 | sb.append(" <code code=\"34133-9\" displayName=\"Summarization of patient data\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 411 | sb.append(" <title>Katy Bradford</title>");
|
---|
| 412 | sb.append(" <effectiveTime value=\"20080424103703-0500\"/>");
|
---|
| 413 | sb.append(" <confidentialityCode/>");
|
---|
| 414 | sb.append(" <languageCode code=\"en-US\"/>");
|
---|
| 415 | sb.append(" <recordTarget>");
|
---|
| 416 | sb.append(" <patientRole>");
|
---|
| 417 | sb.append(" <id extension=\"000-00-0002\"/>");
|
---|
| 418 | sb.append(" <addr>");
|
---|
| 419 | sb.append(" <streetAddressLine>437 TURNER LANE</streetAddressLine>");
|
---|
| 420 | sb.append(" <city>LEESBURG</city>");
|
---|
| 421 | sb.append(" <state>VA</state>");
|
---|
| 422 | sb.append(" <postalCode>20176</postalCode>");
|
---|
| 423 | sb.append(" <country>US</country>");
|
---|
| 424 | sb.append(" </addr>");
|
---|
| 425 | sb.append(" <telecom value=\"tel:703-555-0000\" use=\"HP\"/>");
|
---|
| 426 | sb.append(" <telecom value=\"tel:703-555-0001\" use=\"WP\"/>");
|
---|
| 427 | sb.append(" <telecom value=\"tel:703-555-0002\" use=\"MC\"/>");
|
---|
| 428 | sb.append(" <telecom value=\"mailto:katy.bradford@here.com\"/>");
|
---|
| 429 | sb.append(" <telecom value=\"http://www.here.com/katy\"/>");
|
---|
| 430 | sb.append(" <patient>");
|
---|
| 431 | sb.append(" <name>");
|
---|
| 432 | sb.append(" <prefix>MRS.</prefix>");
|
---|
| 433 | sb.append(" <given qualifier=\"CL\">KATY</given>");
|
---|
| 434 | sb.append(" <family qualifier=\"BR\">BRADFORD</family>");
|
---|
| 435 | sb.append(" </name>");
|
---|
| 436 | sb.append(" <administrativeGenderCode code=\"F\" displayName=\"Female\" codeSystemName=\"HL7 AdministrativeGenderCodes\" codeSystem=\"2.16.840.1.113883.5.1\">");
|
---|
| 437 | sb.append(" <originalText>AdministrativeGender codes are: M (Male), F (Female) or UN (Undifferentiated).</originalText>");
|
---|
| 438 | sb.append(" </administrativeGenderCode>");
|
---|
| 439 | sb.append(" <birthTime value=\"19740730\"/>");
|
---|
| 440 | sb.append(" <maritalStatusCode code=\"M\" displayName=\"Married\" codeSystemName=\"MaritalStatusCode\" codeSystem=\"2.16.840.1.113883.5.2\"/>");
|
---|
| 441 | sb.append(" <religiousAffiliationCode code=\"1005\" displayName=\"Anglican\" codeSystemName=\"Religious Affiliation\" codeSystem=\"2.16.840.1.113883.5.1076\"/>");
|
---|
| 442 | sb.append(" <raceCode code=\"2111-3\" displayName=\"French\" codeSystemName=\"CDC Race and Ethnicity\" codeSystem=\"2.16.840.1.113883.6.238\"/>");
|
---|
| 443 | sb.append(" <ethnicGroupCode code=\"2142-8\" displayName=\"Belearic Islander\" codeSystemName=\"CDC Race and Ethnicity\" codeSystem=\"2.16.840.1.113883.6.238\"/>");
|
---|
| 444 | sb.append(" <languageCommunication>");
|
---|
| 445 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.2\"/>");
|
---|
| 446 | sb.append(" <languageCode code=\"as-AZ\"/>");
|
---|
| 447 | sb.append(" <modeCode code=\"RSGN\" displayName=\"Received Signed\" codeSystemName=\"LanguageAbilityMode\" codeSystem=\"2.16.840.1.113883.5.60\"/>");
|
---|
| 448 | sb.append(" <preferenceInd value=\"true\"/>");
|
---|
| 449 | sb.append(" </languageCommunication>");
|
---|
| 450 | sb.append(" <languageCommunication>");
|
---|
| 451 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.2\"/>");
|
---|
| 452 | sb.append(" <languageCode code=\"cs-AU\"/>");
|
---|
| 453 | sb.append(" <modeCode code=\"EWR\" displayName=\"Expressed Written\" codeSystemName=\"LanguageAbilityMode\" codeSystem=\"2.16.840.1.113883.5.60\"/>");
|
---|
| 454 | sb.append(" <preferenceInd value=\"true\"/>");
|
---|
| 455 | sb.append(" </languageCommunication>");
|
---|
| 456 | sb.append(" </patient>");
|
---|
| 457 | sb.append(" </patientRole>");
|
---|
| 458 | sb.append(" </recordTarget>");
|
---|
| 459 | sb.append(" <author>");
|
---|
| 460 | sb.append(" <time value=\"20080401\"/>");
|
---|
| 461 | sb.append(" <assignedAuthor>");
|
---|
| 462 | sb.append(" <id root=\"8798704325\"/>");
|
---|
| 463 | sb.append(" <assignedPerson>");
|
---|
| 464 | sb.append(" <name>");
|
---|
| 465 | sb.append(" <prefix>MR</prefix>");
|
---|
| 466 | sb.append(" <given qualifier=\"CL\">BOB</given>");
|
---|
| 467 | sb.append(" <family qualifier=\"BR\">DEVRIESE</family>");
|
---|
| 468 | sb.append(" <prefix>ESQ</prefix>");
|
---|
| 469 | sb.append(" </name>");
|
---|
| 470 | sb.append(" </assignedPerson>");
|
---|
| 471 | sb.append(" <representedOrganization>");
|
---|
| 472 | sb.append(" <id root=\"2.16.840.1.113883.19.5\"/>");
|
---|
| 473 | sb.append(" <name>AJAX INSURANCE</name>");
|
---|
| 474 | sb.append(" </representedOrganization>");
|
---|
| 475 | sb.append(" </assignedAuthor>");
|
---|
| 476 | sb.append(" </author>");
|
---|
| 477 | sb.append(" <custodian>");
|
---|
| 478 | sb.append(" <assignedCustodian>");
|
---|
| 479 | sb.append(" <representedCustodianOrganization>");
|
---|
| 480 | sb.append(" <id/>");
|
---|
| 481 | sb.append(" </representedCustodianOrganization>");
|
---|
| 482 | sb.append(" </assignedCustodian>");
|
---|
| 483 | sb.append(" </custodian>");
|
---|
| 484 | sb.append(" <participant typeCode=\"IND\">");
|
---|
| 485 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.3\"/>");
|
---|
| 486 | sb.append(" <time>");
|
---|
| 487 | sb.append(" <low value=\"20080401\"/>");
|
---|
| 488 | sb.append(" <high value=\"20080430\"/>");
|
---|
| 489 | sb.append(" </time>");
|
---|
| 490 | sb.append(" <associatedEntity classCode=\"AGNT\">");
|
---|
| 491 | sb.append(" <code code=\"FRND\" displayName=\"Unrelated Friend\" codeSystemName=\"RoleCode\" codeSystem=\"2.16.840.1.113883.5.111\"/>");
|
---|
| 492 | sb.append(" <addr>");
|
---|
| 493 | sb.append(" <streetAddressLine>439 TURNER LANE</streetAddressLine>");
|
---|
| 494 | sb.append(" <city>LEESBURG</city>");
|
---|
| 495 | sb.append(" <state>VA</state>");
|
---|
| 496 | sb.append(" <postalCode>20176</postalCode>");
|
---|
| 497 | sb.append(" <country>US</country>");
|
---|
| 498 | sb.append(" </addr>");
|
---|
| 499 | sb.append(" <telecom value=\"tel:703-555-0003\" use=\"HP\"/>");
|
---|
| 500 | sb.append(" <telecom value=\"tel:703-555-0004\" use=\"WP\"/>");
|
---|
| 501 | sb.append(" <telecom value=\"tel:703-555-0005\" use=\"MC\"/>");
|
---|
| 502 | sb.append(" <telecom value=\"tel:703-555-0006\" use=\"HV\"/>");
|
---|
| 503 | sb.append(" <telecom value=\"mailto:terry.shaw@here.com\"/>");
|
---|
| 504 | sb.append(" <telecom value=\"http://www.here.com/terry\"/>");
|
---|
| 505 | sb.append(" <associatedPerson>");
|
---|
| 506 | sb.append(" <name>");
|
---|
| 507 | sb.append(" <prefix>MS.</prefix>");
|
---|
| 508 | sb.append(" <given qualifier=\"CL\">TERRY</given>");
|
---|
| 509 | sb.append(" <family qualifier=\"BR\">SHAW</family>");
|
---|
| 510 | sb.append(" <suffix>PHD</suffix>");
|
---|
| 511 | sb.append(" </name>");
|
---|
| 512 | sb.append(" </associatedPerson>");
|
---|
| 513 | sb.append(" </associatedEntity>");
|
---|
| 514 | sb.append(" </participant>");
|
---|
| 515 | sb.append(" <documentationOf>");
|
---|
| 516 | sb.append(" <serviceEvent classCode=\"PCPR\">");
|
---|
| 517 | sb.append(" <effectiveTime>");
|
---|
| 518 | sb.append(" <low value=\"0\"/>");
|
---|
| 519 | sb.append(" <high value=\"2010\"/>");
|
---|
| 520 | sb.append(" </effectiveTime>");
|
---|
| 521 | sb.append(" <performer typeCode=\"PRF\">");
|
---|
| 522 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.4\"/>");
|
---|
| 523 | sb.append(" <functionCode code=\"PP\" displayName=\"Primary Care Provider\" codeSystemName=\"Provider Role\" codeSystem=\"2.16.840.1.113883.12.443\">");
|
---|
| 524 | sb.append(" <originalText>PCP</originalText>");
|
---|
| 525 | sb.append(" </functionCode>");
|
---|
| 526 | sb.append(" <time>");
|
---|
| 527 | sb.append(" <low value=\"20080409\"/>");
|
---|
| 528 | sb.append(" <high value=\"20080430\"/>");
|
---|
| 529 | sb.append(" </time>");
|
---|
| 530 | sb.append(" <assignedEntity>");
|
---|
| 531 | sb.append(" <id/>");
|
---|
| 532 | sb.append(" <code code=\"300000000X\" displayName=\"Managed Care Organizations\" codeSystemName=\"ProviderCodes\" codeSystem=\"2.16.840.1.113883.6.101\"/>");
|
---|
| 533 | sb.append(" <addr>");
|
---|
| 534 | sb.append(" <streetAddressLine>10300 MAIN ST.</streetAddressLine>");
|
---|
| 535 | sb.append(" <streetAddressLine>SUITE 100</streetAddressLine>");
|
---|
| 536 | sb.append(" <city>ASHBURN</city>");
|
---|
| 537 | sb.append(" <state>VA</state>");
|
---|
| 538 | sb.append(" <postalCode>20176</postalCode>");
|
---|
| 539 | sb.append(" <country>AF</country>");
|
---|
| 540 | sb.append(" </addr>");
|
---|
| 541 | sb.append(" <telecom value=\"tel:703-555-0007\" use=\"HP\"/>");
|
---|
| 542 | sb.append(" <telecom value=\"tel:703-555-0008\" use=\"WP\"/>");
|
---|
| 543 | sb.append(" <telecom value=\"tel:703-555-0009\" use=\"MC\"/>");
|
---|
| 544 | sb.append(" <telecom value=\"tel:703-555-0010\" use=\"HV\"/>");
|
---|
| 545 | sb.append(" <telecom value=\"mailto:jw@doctors.com\"/>");
|
---|
| 546 | sb.append(" <telecom value=\"http://www.doctors.com/jw\"/>");
|
---|
| 547 | sb.append(" <assignedPerson>");
|
---|
| 548 | sb.append(" <name>");
|
---|
| 549 | sb.append(" <prefix>DR.</prefix>");
|
---|
| 550 | sb.append(" <given qualifier=\"CL\">JANE</given>");
|
---|
| 551 | sb.append(" <family qualifier=\"BR\">WATSON</family>");
|
---|
| 552 | sb.append(" <suffix>MD</suffix>");
|
---|
| 553 | sb.append(" </name>");
|
---|
| 554 | sb.append(" </assignedPerson>");
|
---|
| 555 | sb.append(" <representedOrganization>");
|
---|
| 556 | sb.append(" <id assigningAuthorityName=\"Doctors Inc.\" root=\"2.16.840.1.113883.3.72.5\"/>");
|
---|
| 557 | sb.append(" <name>Doctors Inc.</name>");
|
---|
| 558 | sb.append(" </representedOrganization>");
|
---|
| 559 | sb.append(" <patient xmlns=\"urn:hl7-org:sdtc\">");
|
---|
| 560 | sb.append(" <id extension=\"MedicalRecordNumber\" root=\"x164353Y1343\" xmlns=\"urn:hl7-org:sdtc\"/>");
|
---|
| 561 | sb.append(" </patient>");
|
---|
| 562 | sb.append(" </assignedEntity>");
|
---|
| 563 | sb.append(" </performer>");
|
---|
| 564 | sb.append(" </serviceEvent>");
|
---|
| 565 | sb.append(" </documentationOf>");
|
---|
| 566 | sb.append(" <component>");
|
---|
| 567 | sb.append(" <structuredBody>");
|
---|
| 568 | sb.append(" <component>");
|
---|
| 569 | sb.append(" <section>");
|
---|
| 570 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.11\"/>");
|
---|
| 571 | sb.append(" <code code=\"11450-4\" displayName=\"Problems\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 572 | sb.append(" <title>Conditions or Problems</title>");
|
---|
| 573 | sb.append(" <text>");
|
---|
| 574 | sb.append(" <table border=\"1\" width=\"100%\">");
|
---|
| 575 | sb.append(" <thead>");
|
---|
| 576 | sb.append(" <tr>");
|
---|
| 577 | sb.append(" <th>Problem Name</th>");
|
---|
| 578 | sb.append(" <th>Problem Type</th>");
|
---|
| 579 | sb.append(" <th>Problem Date</th>");
|
---|
| 580 | sb.append(" </tr>");
|
---|
| 581 | sb.append(" </thead>");
|
---|
| 582 | sb.append(" <tbody>");
|
---|
| 583 | sb.append(" <tr>");
|
---|
| 584 | sb.append(" <td>");
|
---|
| 585 | sb.append(" <content ID=\"problem-1021520383\">Sprained ankle</content>");
|
---|
| 586 | sb.append(" </td>");
|
---|
| 587 | sb.append(" <td>Diagnosis</td>");
|
---|
| 588 | sb.append(" <td>20080401</td>");
|
---|
| 589 | sb.append(" </tr>");
|
---|
| 590 | sb.append(" <tr>");
|
---|
| 591 | sb.append(" <td>");
|
---|
| 592 | sb.append(" <content ID=\"problem-1021520384\">Migraines</content>");
|
---|
| 593 | sb.append(" </td>");
|
---|
| 594 | sb.append(" <td>Problem</td>");
|
---|
| 595 | sb.append(" <td>20080421</td>");
|
---|
| 596 | sb.append(" </tr>");
|
---|
| 597 | sb.append(" </tbody>");
|
---|
| 598 | sb.append(" </table>");
|
---|
| 599 | sb.append(" </text>");
|
---|
| 600 | sb.append(" <entry>");
|
---|
| 601 | sb.append(" <act classCode=\"ACT\" moodCode=\"EVN\">");
|
---|
| 602 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>");
|
---|
| 603 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.7\"/>");
|
---|
| 604 | sb.append(" <id/>");
|
---|
| 605 | sb.append(" <code nullFlavor=\"NA\"/>");
|
---|
| 606 | sb.append(" <effectiveTime>");
|
---|
| 607 | sb.append(" <low value=\"20080401\"/>");
|
---|
| 608 | sb.append(" <high value=\"20080430\"/>");
|
---|
| 609 | sb.append(" </effectiveTime>");
|
---|
| 610 | sb.append(" <entryRelationship typeCode=\"SUBJ\">");
|
---|
| 611 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 612 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>");
|
---|
| 613 | sb.append(" <code code=\"282291009\" displayName=\"Diagnosis\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 614 | sb.append(" <text>");
|
---|
| 615 | sb.append(" <reference value=\"#problem-1021520383\"/>");
|
---|
| 616 | sb.append(" </text>");
|
---|
| 617 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 618 | sb.append(" </observation>");
|
---|
| 619 | sb.append(" </entryRelationship>");
|
---|
| 620 | sb.append(" </act>");
|
---|
| 621 | sb.append(" </entry>");
|
---|
| 622 | sb.append(" <entry>");
|
---|
| 623 | sb.append(" <act classCode=\"ACT\" moodCode=\"EVN\">");
|
---|
| 624 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.27\"/>");
|
---|
| 625 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.7\"/>");
|
---|
| 626 | sb.append(" <id/>");
|
---|
| 627 | sb.append(" <code nullFlavor=\"NA\"/>");
|
---|
| 628 | sb.append(" <effectiveTime>");
|
---|
| 629 | sb.append(" <low value=\"20080421\"/>");
|
---|
| 630 | sb.append(" <high value=\"20080425\"/>");
|
---|
| 631 | sb.append(" </effectiveTime>");
|
---|
| 632 | sb.append(" <entryRelationship typeCode=\"SUBJ\">");
|
---|
| 633 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 634 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.28\"/>");
|
---|
| 635 | sb.append(" <code code=\"55607006\" displayName=\"Problem\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 636 | sb.append(" <text>");
|
---|
| 637 | sb.append(" <reference value=\"#problem-1021520384\"/>");
|
---|
| 638 | sb.append(" </text>");
|
---|
| 639 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 640 | sb.append(" </observation>");
|
---|
| 641 | sb.append(" </entryRelationship>");
|
---|
| 642 | sb.append(" </act>");
|
---|
| 643 | sb.append(" </entry>");
|
---|
| 644 | sb.append(" </section>");
|
---|
| 645 | sb.append(" </component>");
|
---|
| 646 | sb.append(" <component>");
|
---|
| 647 | sb.append(" <section>");
|
---|
| 648 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.2\"/>");
|
---|
| 649 | sb.append(" <code code=\"48765-2\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 650 | sb.append(" <title>Allergies, Adverse Reactions, Alerts</title>");
|
---|
| 651 | sb.append(" <text>");
|
---|
| 652 | sb.append(" <table border=\"1\" width=\"100%\">");
|
---|
| 653 | sb.append(" <thead>");
|
---|
| 654 | sb.append(" <tr>");
|
---|
| 655 | sb.append(" <th>Substance</th>");
|
---|
| 656 | sb.append(" <th>Event Type</th>");
|
---|
| 657 | sb.append(" <th>Severity</th>");
|
---|
| 658 | sb.append(" </tr>");
|
---|
| 659 | sb.append(" </thead>");
|
---|
| 660 | sb.append(" <tbody>");
|
---|
| 661 | sb.append(" <tr>");
|
---|
| 662 | sb.append(" <td>Trucare</td>");
|
---|
| 663 | sb.append(" <td>Drug Allergy</td>");
|
---|
| 664 | sb.append(" <td>");
|
---|
| 665 | sb.append(" <content ID=\"severity-823358778\">Mild</content>");
|
---|
| 666 | sb.append(" </td>");
|
---|
| 667 | sb.append(" </tr>");
|
---|
| 668 | sb.append(" <tr>");
|
---|
| 669 | sb.append(" <td>peanuts</td>");
|
---|
| 670 | sb.append(" <td>Food Allergy</td>");
|
---|
| 671 | sb.append(" <td>");
|
---|
| 672 | sb.append(" <content ID=\"severity-823358779\">Severe</content>");
|
---|
| 673 | sb.append(" </td>");
|
---|
| 674 | sb.append(" </tr>");
|
---|
| 675 | sb.append(" </tbody>");
|
---|
| 676 | sb.append(" </table>");
|
---|
| 677 | sb.append(" </text>");
|
---|
| 678 | sb.append(" <entry>");
|
---|
| 679 | sb.append(" <act classCode=\"ACT\" moodCode=\"EVN\">");
|
---|
| 680 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.27\"/>");
|
---|
| 681 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.6\"/>");
|
---|
| 682 | sb.append(" <id root=\"2C748172-7CC2-4902-8AF0-23A105C4401B\"/>");
|
---|
| 683 | sb.append(" <code nullFlavor=\"NA\"/>");
|
---|
| 684 | sb.append(" <entryRelationship typeCode=\"SUBJ\">");
|
---|
| 685 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 686 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.18\"/>");
|
---|
| 687 | sb.append(" <code code=\"416098002\" displayName=\"Drug Allergy\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 688 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 689 | sb.append(" <effectiveTime>");
|
---|
| 690 | sb.append(" <low value=\"20080401\"/>");
|
---|
| 691 | sb.append(" <high value=\"20080430\"/>");
|
---|
| 692 | sb.append(" </effectiveTime>");
|
---|
| 693 | sb.append(" <participant typeCode=\"CSM\">");
|
---|
| 694 | sb.append(" <participantRole classCode=\"MANU\">");
|
---|
| 695 | sb.append(" <playingEntity classCode=\"MMAT\">");
|
---|
| 696 | sb.append(" <code code=\"00504-554-4433\" displayName=\"Trucare\" codeSystemName=\"RxNorm\" codeSystem=\"2.16.840.1.113883.6.88\"/>");
|
---|
| 697 | sb.append(" <name>Trucare</name>");
|
---|
| 698 | sb.append(" </playingEntity>");
|
---|
| 699 | sb.append(" </participantRole>");
|
---|
| 700 | sb.append(" </participant>");
|
---|
| 701 | sb.append(" </observation>");
|
---|
| 702 | sb.append(" </entryRelationship>");
|
---|
| 703 | sb.append(" </act>");
|
---|
| 704 | sb.append(" </entry>");
|
---|
| 705 | sb.append(" <entry>");
|
---|
| 706 | sb.append(" <act classCode=\"ACT\" moodCode=\"EVN\">");
|
---|
| 707 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.27\"/>");
|
---|
| 708 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.6\"/>");
|
---|
| 709 | sb.append(" <id root=\"2C748172-7CC2-4902-8AF0-23A105C4401B\"/>");
|
---|
| 710 | sb.append(" <code nullFlavor=\"NA\"/>");
|
---|
| 711 | sb.append(" <entryRelationship typeCode=\"SUBJ\">");
|
---|
| 712 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 713 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.18\"/>");
|
---|
| 714 | sb.append(" <code code=\"414285001\" displayName=\"Food Allergy\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 715 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 716 | sb.append(" <effectiveTime>");
|
---|
| 717 | sb.append(" <low value=\"20080414\"/>");
|
---|
| 718 | sb.append(" <high value=\"20080430\"/>");
|
---|
| 719 | sb.append(" </effectiveTime>");
|
---|
| 720 | sb.append(" <participant typeCode=\"CSM\">");
|
---|
| 721 | sb.append(" <participantRole classCode=\"MANU\">");
|
---|
| 722 | sb.append(" <playingEntity classCode=\"MMAT\">");
|
---|
| 723 | sb.append(" <code code=\"75443544\" displayName=\"peanuts\" codeSystemName=\"RxNorm\" codeSystem=\"2.16.840.1.113883.6.88\"/>");
|
---|
| 724 | sb.append(" <name>peanuts</name>");
|
---|
| 725 | sb.append(" </playingEntity>");
|
---|
| 726 | sb.append(" </participantRole>");
|
---|
| 727 | sb.append(" </participant>");
|
---|
| 728 | sb.append(" </observation>");
|
---|
| 729 | sb.append(" </entryRelationship>");
|
---|
| 730 | sb.append(" </act>");
|
---|
| 731 | sb.append(" </entry>");
|
---|
| 732 | sb.append(" </section>");
|
---|
| 733 | sb.append(" </component>");
|
---|
| 734 | sb.append(" <component>");
|
---|
| 735 | sb.append(" <section>");
|
---|
| 736 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.9\"/>");
|
---|
| 737 | sb.append(" <code code=\"48768-6\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 738 | sb.append(" <title>Insurance Providers</title>");
|
---|
| 739 | sb.append(" <text>");
|
---|
| 740 | sb.append(" <table border=\"1\" width=\"100%\">");
|
---|
| 741 | sb.append(" <thead>");
|
---|
| 742 | sb.append(" <tr>");
|
---|
| 743 | sb.append(" <th>Insurance Provider Name</th>");
|
---|
| 744 | sb.append(" <th>Insurance Provider Type</th>");
|
---|
| 745 | sb.append(" <th>Insurance Provider Group Number</th>");
|
---|
| 746 | sb.append(" </tr>");
|
---|
| 747 | sb.append(" </thead>");
|
---|
| 748 | sb.append(" <tbody>");
|
---|
| 749 | sb.append(" <tr>");
|
---|
| 750 | sb.append(" <td>AJAX INSURANCE</td>");
|
---|
| 751 | sb.append(" <td>AJAX INSURANCE</td>");
|
---|
| 752 | sb.append(" <td>G1854093</td>");
|
---|
| 753 | sb.append(" </tr>");
|
---|
| 754 | sb.append(" </tbody>");
|
---|
| 755 | sb.append(" </table>");
|
---|
| 756 | sb.append(" </text>");
|
---|
| 757 | sb.append(" <entry>");
|
---|
| 758 | sb.append(" <act classCode=\"ACT\" moodCode=\"DEF\">");
|
---|
| 759 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.20\"/>");
|
---|
| 760 | sb.append(" <id extension=\"GroupOrContract#\" root=\"G1854093\"/>");
|
---|
| 761 | sb.append(" <code code=\"48768-6\" displayName=\"Payment Sources\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 762 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 763 | sb.append(" <entryRelationship typeCode=\"COMP\">");
|
---|
| 764 | sb.append(" <act classCode=\"ACT\" moodCode=\"EVN\">");
|
---|
| 765 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.26\"/>");
|
---|
| 766 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.5\"/>");
|
---|
| 767 | sb.append(" <id extension=\"GroupOrContract#\" root=\"G1854093\"/>");
|
---|
| 768 | sb.append(" <code code=\"GP\" displayName=\"Group Policy\" codeSystemName=\"X12N-1336\" codeSystem=\"2.16.840.1.113883.6.255.1336\"/>");
|
---|
| 769 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 770 | sb.append(" <performer typeCode=\"PRF\">");
|
---|
| 771 | sb.append(" <assignedEntity classCode=\"ASSIGNED\">");
|
---|
| 772 | sb.append(" <id root=\"2.16.840.1.113883.3.88.3.1\"/>");
|
---|
| 773 | sb.append(" <representedOrganization classCode=\"ORG\">");
|
---|
| 774 | sb.append(" <id root=\"2.16.840.1.113883.19.5\"/>");
|
---|
| 775 | sb.append(" <name>AJAX INSURANCE</name>");
|
---|
| 776 | sb.append(" </representedOrganization>");
|
---|
| 777 | sb.append(" </assignedEntity>");
|
---|
| 778 | sb.append(" </performer>");
|
---|
| 779 | sb.append(" <participant typeCode=\"HLD\">");
|
---|
| 780 | sb.append(" <participantRole classCode=\"IND\">");
|
---|
| 781 | sb.append(" <id extension=\"7095365879\" root=\"AssignAuthorityGUID\"/>");
|
---|
| 782 | sb.append(" <addr>");
|
---|
| 783 | sb.append(" </addr>");
|
---|
| 784 | sb.append(" <playingEntity>");
|
---|
| 785 | sb.append(" <name>");
|
---|
| 786 | sb.append(" </name>");
|
---|
| 787 | sb.append(" <sdtc:birthTime value=\"19630408\"/>");
|
---|
| 788 | sb.append(" </playingEntity>");
|
---|
| 789 | sb.append(" </participantRole>");
|
---|
| 790 | sb.append(" </participant>");
|
---|
| 791 | sb.append(" </act>");
|
---|
| 792 | sb.append(" </entryRelationship>");
|
---|
| 793 | sb.append(" </act>");
|
---|
| 794 | sb.append(" </entry>");
|
---|
| 795 | sb.append(" </section>");
|
---|
| 796 | sb.append(" </component>");
|
---|
| 797 | sb.append(" <component>");
|
---|
| 798 | sb.append(" <section>");
|
---|
| 799 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.8\"/>");
|
---|
| 800 | sb.append(" <code code=\"10160-0\" displayName=\"History of medication use\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 801 | sb.append(" <title>Medications</title>");
|
---|
| 802 | sb.append(" <text>");
|
---|
| 803 | sb.append(" <table border=\"1\" width=\"100%\">");
|
---|
| 804 | sb.append(" <thead>");
|
---|
| 805 | sb.append(" <tr>");
|
---|
| 806 | sb.append(" <th>Product Display Name</th>");
|
---|
| 807 | sb.append(" <th>Free Text Brand Name</th>");
|
---|
| 808 | sb.append(" <th>Ordered Value</th>");
|
---|
| 809 | sb.append(" <th>Ordered Unit</th>");
|
---|
| 810 | sb.append(" <th>Expiration Time</th>");
|
---|
| 811 | sb.append(" </tr>");
|
---|
| 812 | sb.append(" </thead>");
|
---|
| 813 | sb.append(" <tbody>");
|
---|
| 814 | sb.append(" <tr>");
|
---|
| 815 | sb.append(" <td>");
|
---|
| 816 | sb.append(" <content ID=\"medication-809983199\">Hyaline</content>");
|
---|
| 817 | sb.append(" </td>");
|
---|
| 818 | sb.append(" <td>Hyalinia</td>");
|
---|
| 819 | sb.append(" <td>30.0</td>");
|
---|
| 820 | sb.append(" <td>TAB</td>");
|
---|
| 821 | sb.append(" <td>20080430</td>");
|
---|
| 822 | sb.append(" </tr>");
|
---|
| 823 | sb.append(" </tbody>");
|
---|
| 824 | sb.append(" </table>");
|
---|
| 825 | sb.append(" </text>");
|
---|
| 826 | sb.append(" <entry>");
|
---|
| 827 | sb.append(" <substanceAdministration classCode=\"SBADM\" moodCode=\"EVN\">");
|
---|
| 828 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.24\"/>");
|
---|
| 829 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.8\"/>");
|
---|
| 830 | sb.append(" <id/>");
|
---|
| 831 | sb.append(" <consumable>");
|
---|
| 832 | sb.append(" <manufacturedProduct classCode=\"MANU\">");
|
---|
| 833 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.53\"/>");
|
---|
| 834 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.9\"/>");
|
---|
| 835 | sb.append(" <manufacturedMaterial classCode=\"MMAT\" determinerCode=\"KIND\">");
|
---|
| 836 | sb.append(" <code code=\"87643566\" displayName=\"Hyaline\" codeSystemName=\"RxNorm\" codeSystem=\"2.16.840.1.113883.6.88\">");
|
---|
| 837 | sb.append(" <originalText>Hyaline</originalText>");
|
---|
| 838 | sb.append(" </code>");
|
---|
| 839 | sb.append(" <name>Hyalinia</name>");
|
---|
| 840 | sb.append(" </manufacturedMaterial>");
|
---|
| 841 | sb.append(" </manufacturedProduct>");
|
---|
| 842 | sb.append(" </consumable>");
|
---|
| 843 | sb.append(" <entryRelationship typeCode=\"SUBJ\">");
|
---|
| 844 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 845 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.11.32.10\"/>");
|
---|
| 846 | sb.append(" <code code=\"73639000\" displayName=\"Prescription Drug\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 847 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 848 | sb.append(" </observation>");
|
---|
| 849 | sb.append(" </entryRelationship>");
|
---|
| 850 | sb.append(" <entryRelationship typeCode=\"REFR\">");
|
---|
| 851 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 852 | sb.append(" <code code=\"33999-4\" displayName=\"Status\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 853 | sb.append(" <statusCode code=\"Dispensed\"/>");
|
---|
| 854 | sb.append(" <value code=\"55561003\" displayName=\"Active\" xsi:type=\"CE\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 855 | sb.append(" </observation>");
|
---|
| 856 | sb.append(" </entryRelationship>");
|
---|
| 857 | sb.append(" <entryRelationship typeCode=\"REFR\">");
|
---|
| 858 | sb.append(" <supply classCode=\"SPLY\" moodCode=\"INT\">");
|
---|
| 859 | sb.append(" <templateId root=\"2.16.840.1.113883.3.88.1.11.32.11\"/>");
|
---|
| 860 | sb.append(" <id extension=\"SCRIP#\" root=\"TAB\"/>");
|
---|
| 861 | sb.append(" <effectiveTime value=\"20080430\"/>");
|
---|
| 862 | sb.append(" <quantity value=\"30.0\"/>");
|
---|
| 863 | sb.append(" </supply>");
|
---|
| 864 | sb.append(" </entryRelationship>");
|
---|
| 865 | sb.append(" </substanceAdministration>");
|
---|
| 866 | sb.append(" </entry>");
|
---|
| 867 | sb.append(" </section>");
|
---|
| 868 | sb.append(" </component>");
|
---|
| 869 | sb.append(" <component>");
|
---|
| 870 | sb.append(" <section>");
|
---|
| 871 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.1\"/>");
|
---|
| 872 | sb.append(" <code code=\"42348-3\" codeSystemName=\"LOINC\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 873 | sb.append(" <title>Advance Directive</title>");
|
---|
| 874 | sb.append(" <text>");
|
---|
| 875 | sb.append(" <content ID=\"advance-directive-989570598\">Blood transfusion OK</content>");
|
---|
| 876 | sb.append(" </text>");
|
---|
| 877 | sb.append(" <entry>");
|
---|
| 878 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 879 | sb.append(" <templateId assigningAuthorityName=\"CCD\" root=\"2.16.840.1.113883.10.20.1.17\"/>");
|
---|
| 880 | sb.append(" <templateId assigningAuthorityName=\"HITSP/C32\" root=\"2.16.840.1.113883.3.88.11.32.13\"/>");
|
---|
| 881 | sb.append(" <id/>");
|
---|
| 882 | sb.append(" <code code=\"116859006\" displayName=\"Transfusion of Blood\" codeSystemName=\"SNOMED CT\" codeSystem=\"2.16.840.1.113883.6.96\">");
|
---|
| 883 | sb.append(" <originalText>");
|
---|
| 884 | sb.append(" <reference value=\"advance-directive-989570598\"/>");
|
---|
| 885 | sb.append(" </originalText>");
|
---|
| 886 | sb.append(" </code>");
|
---|
| 887 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 888 | sb.append(" <effectiveTime>");
|
---|
| 889 | sb.append(" <low value=\"20080401\"/>");
|
---|
| 890 | sb.append(" <high value=\"20080430\"/>");
|
---|
| 891 | sb.append(" </effectiveTime>");
|
---|
| 892 | sb.append(" <participant typeCode=\"CST\">");
|
---|
| 893 | sb.append(" <participantRole classCode=\"AGNT\">");
|
---|
| 894 | sb.append(" <addr>");
|
---|
| 895 | sb.append(" <streetAddressLine>9435 BELL ROAD</streetAddressLine>");
|
---|
| 896 | sb.append(" <streetAddressLine>2ND FLOOR</streetAddressLine>");
|
---|
| 897 | sb.append(" <city>LEESBURG</city>");
|
---|
| 898 | sb.append(" <state>VA</state>");
|
---|
| 899 | sb.append(" <postalCode>20155</postalCode>");
|
---|
| 900 | sb.append(" <country>US</country>");
|
---|
| 901 | sb.append(" </addr>");
|
---|
| 902 | sb.append(" <telecom value=\"tel:703-555-0011\" use=\"HP\"/>");
|
---|
| 903 | sb.append(" <telecom value=\"tel:703-555-0012\" use=\"WP\"/>");
|
---|
| 904 | sb.append(" <telecom value=\"tel:703-555-0013\" use=\"MC\"/>");
|
---|
| 905 | sb.append(" <telecom value=\"tel:703-555-0014\" use=\"HV\"/>");
|
---|
| 906 | sb.append(" <telecom value=\"mailto:smith@doctors.com\"/>");
|
---|
| 907 | sb.append(" <telecom value=\"http://www.here.com/smith\"/>");
|
---|
| 908 | sb.append(" <playingEntity>");
|
---|
| 909 | sb.append(" <name>");
|
---|
| 910 | sb.append(" <prefix>MR</prefix>");
|
---|
| 911 | sb.append(" <given qualifier=\"CL\">FRED</given>");
|
---|
| 912 | sb.append(" <family qualifier=\"BR\">SMITH</family>");
|
---|
| 913 | sb.append(" <suffix>ESQ</suffix>");
|
---|
| 914 | sb.append(" </name>");
|
---|
| 915 | sb.append(" </playingEntity>");
|
---|
| 916 | sb.append(" </participantRole>");
|
---|
| 917 | sb.append(" </participant>");
|
---|
| 918 | sb.append(" <entryRelationship typeCode=\"REFR\">");
|
---|
| 919 | sb.append(" <observation classCode=\"OBS\" moodCode=\"EVN\">");
|
---|
| 920 | sb.append(" <templateId root=\"2.16.840.1.113883.10.20.1.37\"/>");
|
---|
| 921 | sb.append(" <code code=\"33999-4\" displayName=\"Status\" codeSystem=\"2.16.840.1.113883.6.1\"/>");
|
---|
| 922 | sb.append(" <statusCode code=\"completed\"/>");
|
---|
| 923 | sb.append(" <value code=\"15240007\" displayName=\"Current and verified\" xsi:type=\"CE\" codeSystem=\"2.16.840.1.113883.6.96\"/>");
|
---|
| 924 | sb.append(" </observation>");
|
---|
| 925 | sb.append(" </entryRelationship>");
|
---|
| 926 | sb.append(" </observation>");
|
---|
| 927 | sb.append(" </entry>");
|
---|
| 928 | sb.append(" </section>");
|
---|
| 929 | sb.append(" </component>");
|
---|
| 930 | sb.append(" </structuredBody>");
|
---|
| 931 | sb.append(" </component>");
|
---|
| 932 | sb.append("</ClinicalDocument>");
|
---|
| 933 | return sb.toString();
|
---|
| 934 | }
|
---|
| 935 | }
|
---|