Produced by Araxis Merge on 1/17/2019 1:51:43 PM Central Standard 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 | C:\AraxisMergeCompare\Pri_un\ccra\ccra_HSIE_IC\PPMS\Client\REST\GetProviderCareSites | Operation.cls | Thu Jan 10 13:20:28 2019 UTC |
2 | C:\AraxisMergeCompare\Pri_re\ccra\ccra_HSIE_IC\PPMS\Client\REST\GetProviderCareSites | Operation.cls | Thu Jan 10 16:31:28 2019 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 210 |
Changed | 1 | 2 |
Inserted | 1 | 1 |
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 | Class PPMS .Client.RE ST.GetProv iderCareSi tes.Operat ion Extend s (EnsLib. REST.Opera tion, HS.U til.Trace. Helper) | |||||
2 | { | |||||
3 | ||||||
4 | /// add al l properti es from PP MS to care sites obj ect | |||||
5 | Property P arseAllPro perties As %Boolean; | |||||
6 | ||||||
7 | Parameter SETTINGS = "ParseAll Properties "; | |||||
8 | ||||||
9 | Parameter INVOCATION = "Queue" ; | |||||
10 | ||||||
11 | Method get ProviderCa reSites(pR equest As PPMS.Clien t.Message. GetCareSit esRequest, Output pR esponse As PPMS.Clie nt.Message .GetCareSi tesRespons e) As %Sta tus | |||||
12 | { | |||||
13 | ||||||
14 | #dim tSC As %Statu s = $$$OK | |||||
15 | #dim err AS %Excep tion.Abstr actExcepti on | |||||
16 | #dim tCa reSite As PPMS.Clien t.CareSite | |||||
17 | ||||||
18 | try { | |||||
19 | ||||||
20 | s pResponse = ##class( PPMS.Clien t.Message. GetCareSit esResponse ).%New() | |||||
21 | ||||||
22 | // build URL | |||||
23 | // Format: https://np .dws.ppms. DOMAIN . EX /v1.0/Prov iders(1770 995755)/Ca reSites | |||||
24 | ||||||
25 | s tURL = ..A dapter.URL | |||||
26 | s tURL = $Re place(tURL ,"(inputNP I)","("_pR equest.NPI _")") | |||||
27 | ||||||
28 | // execute c all | |||||
29 | s tSC = ..Ad apter.GetU RL(tURL,.t HttpRespon se) | |||||
30 | ||||||
31 | $$$HST RACE("tHtt pResponse" ,"tHttpRes ponse",tHt tpResponse .Data) | |||||
32 | ||||||
33 | i $$$I SERR(tSC) && $IsObje ct(tHttpRe sponse) && $IsObject (tHttpResp onse.Data) && tHttpR esponse.Da ta.Size { | |||||
34 | ||||||
35 | s tS C=$$$ERROR ($$$EnsErr General,$$ $StatusDis playString (tSC)_":"_ tHttpRespo nse.Data.R ead()) | |||||
36 | ||||||
37 | } | |||||
38 | ||||||
39 | i tSC[ "No Care S ites found " { | |||||
40 | ||||||
41 | s tS C = $$$OK | |||||
42 | ||||||
43 | } else { | |||||
44 | ||||||
45 | $$$T hrowOnErro r(tSC) | |||||
46 | s ^z sam("cares ites", pRe quest.NPI) = "" | |||||
47 | i $I sObject(tH ttpRespons e) { | |||||
48 | ||||||
49 | $$ $HSTRACE(" tHttpRespo nse","tHtt pResponse" ,tHttpResp onse.Data) | |||||
50 | /* | |||||
51 | // Convert J SON into a Proxy Cac he Array | |||||
52 | s tJSONArray ={}.%FromJ SON(tHttpR esponse.Da ta) | |||||
53 | ||||||
54 | // Get Itera tor for ea ch provide r in the J SON Stream (each "va lue") | |||||
55 | s tIter = tJ SONArray.% Get("value ").%GetIte rator() | |||||
56 | s tKey = "" | |||||
57 | ||||||
58 | // Iterate t hru the "v alue" coll ection to create a s pecialty o bject for each provi der. | |||||
59 | wh ile tIter. %GetNext(. key) { | |||||
60 | ||||||
61 | s tSpecial ty = ##cla ss(PPMS.Cl ient.Speci alty).%New () | |||||
62 | s tSpecial ty.CodedSp ecialty = tJSONArray .%Get("val ue").%Get( key).%Get( "CodedSpec ialty") | |||||
63 | s tSpecial ty.IsPrima ryType = t JSONArray. %Get("valu e").%Get(k ey).%Get(" IsPrimaryT ype") | |||||
64 | s tSpecial ty.Name = tJSONArray .%Get("val ue").%Get( key).%Get( "Name") | |||||
65 | ||||||
66 | ;the follo wing prope rties aren 't current ly needed | |||||
67 | i ..ParseA llProperti es { | |||||
68 | ||||||
69 | s tSpeci alty.Owner Name = tJS ONArray.%G et("value" ).%Get(key ).%Get("Ow nerName") | |||||
70 | s tSpeci alty.Provi derName = tJSONArray .%Get("val ue").%Get( key).%Get( "ProviderN ame") | |||||
71 | s tSpeci alty.Speci altyName = tJSONArra y.%Get("va lue").%Get (key).%Get ("Specialt yName") | |||||
72 | ||||||
73 | } | |||||
74 | ||||||
75 | // add spe cialty to response c ollection | |||||
76 | s tSC = pR esponse.Sp ecialties. Insert(tSp ecialty) | |||||
77 | ||||||
78 | } | |||||
79 | */ | |||||
80 | } | |||||
81 | ||||||
82 | ;$$$ ThrowOnErr or(pRespon se.%Save() ) | |||||
83 | ||||||
84 | } | |||||
85 | ||||||
86 | } catch err { | |||||
87 | ||||||
88 | $$$LOGALER T("Error r etrieving care sites for NPI: "_pRequest .NPI) | |||||
89 | ;s tSC = e rr.AsStatu s() | |||||
90 | s tSC = $$ $OK | |||||
91 | ||||||
92 | } | |||||
93 | ||||||
94 | quit tSC | |||||
95 | } | |||||
96 | ||||||
97 | XData Mess ageMap | |||||
98 | { | |||||
99 | <MapItems> | |||||
100 | <MapItem MessageTy pe="PPMS.C lient.Mess age.GetCar eSitesRequ est"> | |||||
101 | <Metho d>getProvi derCareSit es</Method > | |||||
102 | </MapIte m> | |||||
103 | </MapItems > | |||||
104 | } | |||||
105 | ||||||
106 | } | |||||
107 | T |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.