Produced by Araxis Merge on 3/13/2018 7:47:51 PM Central 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 | TASCore_v1.0_Build_2_Jan_2018.zip\MCCF_EDI_TAS_WebUI\src\app\mccf-einsurance\service\fhir-data | fhir-data.service.spec.ts | Thu Feb 15 21:16:56 2018 UTC |
| 2 | TASCore_v1.0_Build_2_Jan_2018.zip\MCCF_EDI_TAS_WebUI\src\app\mccf-einsurance\service\fhir-data | fhir-data.service.spec.ts | Fri Mar 9 15:58:36 2018 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 7 | 298 |
| Changed | 6 | 12 |
| 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 | import { T estBed, in ject, fake Async, asy nc, tick } from '@an gular/core /testing' | |
| 2 | import { M ockBackend , MockConn ection } f rom '@angu lar/http/t esting' | |
| 3 | import { H ttp, BaseR equestOpti ons, Respo nse, Respo nseOptions , RequestM ethod } fr om '@angul ar/http' | |
| 4 | import { E rrorServic e } from ' ../../../c ore/error- messages/e rror.servi ce' | |
| 5 | ||
| 6 | import { F hirDataSer vice } fro m './fhir- data.servi ce' | |
| 7 | import { P rovider } from './pr ovider' | |
| 8 | import { P atient } f rom './pat ient' | |
| 9 | import { R esource } from './re source' | |
| 10 | import { I dentifier } from './ identifier ' | |
| 11 | import { E xtension } from './e xtension' | |
| 12 | import { T elecom } f rom './tel ecom' | |
| 13 | import { A ddress } f rom './add ress' | |
| 14 | import { R ole } from './role' | |
| 15 | import { U se } from './use' | |
| 16 | import { I tem } from './item' | |
| 17 | import { E xposure } from './ex posure' | |
| 18 | import { F acility } from './fa cility' | |
| 19 | import { T ypeCoding } from './ type-codin g' | |
| 20 | ||
| 21 | ||
| 22 | describe(' FhirServic e', () => { | |
| 23 | let serv ice: FhirD ataService | |
| 24 | let back end: MockB ackend | |
| 25 | ||
| 26 | beforeEa ch(() => { | |
| 27 | TestBe d.configur eTestingMo dule({ | |
| 28 | prov iders: [Fh irDataServ ice, | |
| 29 | Mo ckBackend, | |
| 30 | Er rorService , | |
| 31 | Ba seRequestO ptions, | |
| 32 | Re source, | |
| 33 | Pr ovider, | |
| 34 | Pa tient, | |
| 35 | Id entifier, | |
| 36 | Ex tension, | |
| 37 | Te lecom, | |
| 38 | Ad dress, | |
| 39 | Ro le, | |
| 40 | Us e, | |
| 41 | It em,Exposur e,Facility ,TypeCodin g, | |
| 42 | { | |
| 43 | provide: H ttp, | |
| 44 | useFactory : function (mockBacke nd, defaul tOptions) { | |
| 45 | return n ew Http(mo ckBackend, defaultOp tions) | |
| 46 | }, | |
| 47 | deps: [Moc kBackend, BaseReques tOptions] | |
| 48 | } | |
| 49 | ] | |
| 50 | }) | |
| 51 | }) | |
| 52 | ||
| 53 | beforeEa ch(inject( [FhirDataS ervice, Mo ckBackend] , function (fhirServi ce, mockBa ckend) { | |
| 54 | servic e = fhirSe rvice | |
| 55 | backen d = mockBa ckend | |
| 56 | })); | |
| 57 | ||
| 58 | afterEac h(function () { | |
| 59 | TestBe d.resetTes tingModule () | |
| 60 | }); | |
| 61 | ||
| 62 | it('getR esources t reatment f acility sh ould get d ata', asyn c () => { | |
| 63 | ||
| 64 | backen d.connecti ons.subscr ibe(functi on(connect ion: MockC onnection) { | |
| 65 | ||
| 66 | let options = new Respon seOptions( | |
| 67 | { body: { | |
| 68 | ||
| 69 | "resourc eType":"Or ganization ", | |
| 70 | "identifie r[0].syste m":"http:/ / URL /fhir/sid/ fileman/fi le/4", | |
| 71 | "identif ier[0].use ":"usual", | |
| 72 | "identif ier[0].val ue":"59", | |
| 73 | "identif ier[1].use ":"usual", | |
| 74 | "identif ier[1].val ue":"", | |
| 75 | "active" :"true", | |
| 76 | "type.co ding.syste m":"http:/ /hl7.org/f hir/ValueS et/organiz ation-type ", | |
| 77 | "type.co ding.code" :"institut ion", | |
| 78 | "type.co ding.text" :"VA Treat ing Facili ty", | |
| 79 | "name":" SAN DIEGO HCS (664)" , | |
| 80 | "name.ex tension.of ficial":"" , | |
| 81 | "telecom [0].system ":"phone", | |
| 82 | "telecom [0].value" :"", | |
| 83 | "telecom[0 ].use.syst em":"http: // URL /fhir/code -system/te lecom-use" , | |
| 84 | "telecom [0].use.va lue":"work ", | |
| 85 | "telecom [0].rank": "50", | |
| 86 | "address[0 ].use.syst em":"http: // URL /fhir/code -system/ad dress-use" , | |
| 87 | "address [0].use.va lue":"phys ical addre ss", | |
| 88 | "address [0].type": "both", | |
| 89 | "address [0].line[0 ]":"<no ad dress prov ided>" | |
| 90 | ||
| 91 | } | |
| 92 | } | |
| 93 | ) | |
| 94 | conn ection.moc kRespond(n ew Respons e(options) ); | |
| 95 | }) | |
| 96 | ||
| 97 | let re source: Ar ray<Resour ce> | |
| 98 | ||
| 99 | await service.ge tResources ('tf','1') .subscribe (res => { | |
| 100 | res ource = re s | |
| 101 | }) | |
| 102 | ||
| 103 | expect (resource. length).to Equal(1) | |
| 104 | expect (resource[ 0].resourc eType).toE qual('Orga nization') | |
| 105 | }) | |
| 106 | ||
| 107 | ||
| 108 | it('getR esources p ractitione r should g et data', async () = > { | |
| 109 | ||
| 110 | backen d.connecti ons.subscr ibe(functi on(connect ion: MockC onnection) { | |
| 111 | ||
| 112 | let options = new Respon seOptions( | |
| 113 | { body: { | |
| 114 | ||
| 115 | "resourc eType":"pr ac", | |
| 116 | "identifie r[0].syste m":"http:/ / URL /fhir/sid/ fileman/fi le/4", | |
| 117 | "identif ier[0].use ":"usual", | |
| 118 | "identif ier[0].val ue":"59", | |
| 119 | "identif ier[1].use ":"usual", | |
| 120 | "identif ier[1].val ue":"", | |
| 121 | "active" :"true", | |
| 122 | "type.co ding.syste m":"http:/ /hl7.org/f hir/ValueS et/organiz ation-type ", | |
| 123 | "type.co ding.code" :"institut ion", | |
| 124 | "type.co ding.text" :"VA Treat ing Facili ty", | |
| 125 | "name":" SAN DIEGO HCS (664)" , | |
| 126 | "name.ex tension.of ficial":"" , | |
| 127 | "telecom [0].system ":"phone", | |
| 128 | "telecom [0].value" :"", | |
| 129 | "telecom[0 ].use.syst em":"http: // URL /fhir/code -system/te lecom-use" , | |
| 130 | "telecom [0].use.va lue":"work ", | |
| 131 | "telecom [0].rank": "50", | |
| 132 | "address[0 ].use.syst em":"http: // URL /fhir/code -system/ad dress-use" , | |
| 133 | "address [0].use.va lue":"phys ical addre ss", | |
| 134 | "address [0].type": "both", | |
| 135 | "address [0].line[0 ]":"<no ad dress prov ided>" | |
| 136 | ||
| 137 | } | |
| 138 | } | |
| 139 | ) | |
| 140 | conn ection.moc kRespond(n ew Respons e(options) ); | |
| 141 | }) | |
| 142 | ||
| 143 | let re source: Ar ray<Resour ce> | |
| 144 | ||
| 145 | await service.ge tResources ('prv','1' ).subscrib e(res => { | |
| 146 | res ource = re s | |
| 147 | }) | |
| 148 | ||
| 149 | expect (resource. length).to Equal(1) | |
| 150 | expect (resource[ 0].resourc eType).toE qual('prac ') | |
| 151 | }) | |
| 152 | ||
| 153 | ||
| 154 | ||
| 155 | }) |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.