Produced by Araxis Merge on 9/15/2018 10:47:18 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_fhir\mhv-fhir-ws\src\main\java\gov\va\med\mhv\fhir\mapper | PatientDtoConverter.java | Thu Aug 23 21:30:40 2018 UTC |
| 2 | MHV_2018.4.0.0.zip\2018.4.0.0\national portal\mhv_source\mhv_fhir\mhv-fhir-ws\src\main\java\gov\va\med\mhv\fhir\mapper | PatientDtoConverter.java | Sat Sep 15 20:37:51 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 138 |
| Changed | 1 | 2 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | /** | |
| 2 | * | |
| 3 | */ | |
| 4 | package go v.va.med.m hv.fhir.ma pper; | |
| 5 | ||
| 6 | import org .springfra mework.cor e.convert. converter. Converter; | |
| 7 | import org .springfra mework.ste reotype.Co mponent; | |
| 8 | ||
| 9 | import ca. uhn.fhir.m odel.dstu2 .resource. Patient; | |
| 10 | import ca. uhn.fhir.m odel.dstu2 .valueset. Administra tiveGender Enum; | |
| 11 | import ca. uhn.fhir.m odel.primi tive.IdDt; | |
| 12 | import ca. uhn.fhir.m odel.primi tive.UriDt ; | |
| 13 | import gov .va.med.mh v.common.a pi.dto.Pat ientDTO; | |
| 14 | ||
| 15 | /** | |
| 16 | * @author DNS | |
| 17 | * | |
| 18 | */ | |
| 19 | @Component | |
| 20 | public cla ss Patient DtoConvert er impleme nts Conver ter<Patien tDTO, Pati ent> { | |
| 21 | ||
| 22 | pr ivate stat ic final S tring URN_ VA_PATIENT _ICN = "ur n:gov.va.m ed.mhv.fhi r:patient: icn"; | |
| 23 | pr ivate stat ic final S tring URN_ VA_PATIENT _MHVID = " urn:gov.va .med.mhv.f hir:patien t:mhvid"; | |
| 24 | pr ivate stat ic final S tring GEND ER_MALE = "Male"; | |
| 25 | pr ivate stat ic final S tring GEND ER_FEMALE = "Female" ; | |
| 26 | ||
| 27 | @O verride | |
| 28 | pu blic Patie nt convert (PatientDT O dto) { | |
| 29 | ||
| 30 | if(d to == null ) { | |
| 31 | return null; | |
| 32 | } | |
| 33 | ||
| 34 | Pati ent patien t = new Pa tient(); | |
| 35 | ||
| 36 | pati ent.setId( new IdDt(d to.getId() )); | |
| 37 | ||
| 38 | // a dd the ICN patient i dentifier | |
| 39 | pati ent.addIde ntifier(); | |
| 40 | pati ent.getIde ntifier(). get(0).set System(new UriDt(URN _VA_PATIEN T_ICN)); | |
| 41 | pati ent.getIde ntifier(). get(0).set Value(dto. getIcn()); | |
| 42 | ||
| 43 | pati ent.addIde ntifier(); | |
| 44 | pati ent.getIde ntifier(). get(1).set System(new UriDt(URN _VA_PATIEN T_MHVID)); | |
| 45 | pati ent.getIde ntifier(). get(1).set Value(dto. getId().to String()); | |
| 46 | ||
| 47 | // a dd the Pat ient name | |
| 48 | pati ent.addNam e().addFam ily(dto.ge tUserProfi le().getNa me().getLa stName()); | |
| 49 | pati ent.getNam e().get(0) .addGiven( dto.getUse rProfile() .getName() .getFirstN ame()); | |
| 50 | if(d to.getUser Profile(). getName(). getMiddleN ame() != n ull && !"" .equals(dt o.getUserP rofile().g etName().g etMiddleNa me())) | |
| 51 | { | |
| 52 | patien t.getName( ).get(0).a ddGiven(dt o.getUserP rofile().g etName().g etMiddleNa me()); | |
| 53 | } | |
| 54 | ||
| 55 | // s et the gen der for th e patient. | |
| 56 | Admi nistrative GenderEnum gender = null; | |
| 57 | if(G ENDER_MALE .equalsIgn oreCase(dt o.getUserP rofile().g etGender() )) { | |
| 58 | patien t.setGende r(Administ rativeGend erEnum.MAL E); | |
| 59 | } | |
| 60 | else if (GENDE R_FEMALE.e qualsIgnor eCase(dto. getUserPro file().get Gender())) { | |
| 61 | patien t.setGende r(Administ rativeGend erEnum.FEM ALE); | |
| 62 | } | |
| 63 | else { | |
| 64 | patien t.setGende r(Administ rativeGend erEnum.UNK NOWN); | |
| 65 | } | |
| 66 | ||
| 67 | retu rn patient ; | |
| 68 | } | |
| 69 | ||
| 70 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.