52. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 1/17/2019 1:51:42 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.

52.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\ccra\ccra_HSIE_IC\eCAMS\Operation ReferralDocumentToeCAMS.cls Thu Jan 10 13:20:00 2019 UTC
2 C:\AraxisMergeCompare\Pri_re\ccra\ccra_HSIE_IC\eCAMS\Operation ReferralDocumentToeCAMS.cls Thu Jan 10 16:31:30 2019 UTC

52.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 222
Changed 1 2
Inserted 0 0
Removed 0 0

52.3 Comparison options

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

52.4 Active regular expressions

No regular expressions were active.

52.5 Comparison detail

  1    Class eCAM S.Operatio n.Referral DocumentTo eCAMS Exte nds (EnsLi b.REST.Gen ericOperat ion, HS.Ut il.Trace.H elper)
  2    {
  3   
  4    Parameter  INVOCATION  = "Queue" ;
  5   
  6    Parameter  ADAPTER =  "EnsLib.HT TP.Outboun dAdapter";
  7   
  8    Property S erviceName  As %Strin g [ Initia lExpressio n = "eCAMS .SendRefer ral" ];
  9   
  10    Parameter  SETTINGS =  "ServiceN ame:Basic" ;
  11   
  12    Property A dapter As  EnsLib.HTT P.Outbound Adapter;
  13   
  14    Method OnI nit() As % Status
  15    {
  16            Se t ..%HttpR equest=##c lass(eCAMS .Message.e CAMSHTTPRe quest).%Ne w()
  17            $$ $HSTRACE("  OnInit "  )
  18            Qu it $$$OK
  19    }
  20   
  21    // 8-1-18  JLM
  22   
  23    // Sends r eferral to  FSC/eCAMS  through a  RESTful A PI
  24   
  25    // Send an y errors t o Ens.Aler t for proc essing
  26   
  27    Method OnM essage(pRe quest As e CAMS.Messa ge.eCAMSRe ferralRequ est, Outpu t pRespons e As EnsLi b.HTTP.Gen ericMessag e) As %Sta tus
  28    {
  29   
  30            #d im tSC As  %Status =  $$$OK
  31            #d im tHttpRe sponse As  %Net.HttpR esponse
  32            #d im tEndPoi nt as HS.R egistry.Se rvice.HTTP
  33             
  34            tr y{    
  35                              //Get  WS Locatio n from HS  Service Re gistry
  36                              Set tE ndPoint =  ##class(HS .Registry. Service.HT TP).EndPoi ntForNameT ype(..Serv iceName,"H TTP")
  37                              If $is Object(tEn dPoint) {
  38                                       Set ..Ad apter.URL  = tEndPoin t.URL 
  39                                       Set ..Ad apter.HTTP Server = t EndPoint.H ost
  40                                       Set ..Ad apter.HTTP Port = tEn dPoint.Por t
  41                              } else  {
  42                                       $$$Throw OnError($$ $ERROR($$$ GeneralErr or,"Servic eName not  found"))
  43                              }                
  44                              
  45                              //send  referral  to FSC/eCA MS
  46                              Do ..% HttpReques t.SetHeade r("Authori zation","B asic dmFmc 2NhdXRoZWN hbXNfZGV2O nRJNU41alV ZTlVhU1NuN 0tqeHVs")
  47                              Set .. %HttpReque st.EntityB ody =  pRe quest.Stre am                 
  48                              $$$HST RACE("Head er List: "  _ ..%Http Request.Re turnHeader s())
  49                               Set tSC =  ..Adapter. SendF
D NS     aArray(.tH ttpRespons e, "POST",  ..%HttpRe quest, .pF ormVarName s , .pData )
  50   
  51                     //Pr ocess resp onse/error  received  from FSC/e CAMS
  52                     If $ IsObject(t HttpRespon se) {
  53                                       If $IsOb ject(tHttp Response.D ata) {
  54                                                Set sRespo nseBody =  tHttpRespo nse.Data.R ead()            
  55                                                Set sStatu s = tHttpR esponse.St atusCode
  56                                                $$$HSTRACE ("HTTP Sta tus: " _ s Status _ $ char(10) _  "Response  body: " _  sResponse Body)                     
  57                                                if (sStatu s = "200") {
  58                                                        /*  Check tha t there wa sn't a dat a validati on error. 
  59                                                                 200  only means  that the  message wa s received /parsed, n ot that th e data con tained in  the body w as valid.
  60                                                        */
  61                                                        Se t requestO bject = {} .%FromJSON (sResponse Body)
  62                                                        se t sRespons eStatus =  requestObj ect.Respon seStatus
  63                                                        if  (sRespons eStatus =  "Error"){
  64                                                                 set  sResponseC ode = requ estObject. ResponseSt atusCode
  65                                                                 Set  sErrorMess age = requ estObject. ErrorMessa ges.messag e.message
  66                                                                 set  exception  = ##class( %Exception .General). %New("eCAM S Data Val idation Er ror ",sRes ponseCode, , sErrorMe ssage )
  67                                                                 thro w exceptio n
  68                                                        }                                  
  69                                                }
  70                                                elseif (sS tatus = "4 04" ){
  71                                                        $$ $HSTRACE(" 404 Error" )
  72                                                        $$ $LOGERROR( "Endpoint  Not Found:   " _ $cha r(10) _ sS tatus _ $c har(10) _  sResponseB ody)
  73                                                        se t exceptio n = ##clas s(%Excepti on.General ).%New("eC AMS Connec tion Error  ",sStatus ,, sRespon seBody )
  74                                                        th row except ion
  75                                                }                                          
  76                                                elseif (sS tatus = "5 00" ){
  77                                                        $$ $LOGERROR( "Connectio n Error:   " _ $char( 10) _ sSta tus _ $cha r(10) _ sR esponseBod y)
  78                                                        se t exceptio n = ##clas s(%Excepti on.General ).%New("eC AMS Connec tion Error  ",sStatus ,, sRespon seBody )
  79                                                        th row except ion
  80                                                }
  81                                                else{
  82                                                        $$ $LOGERROR( "Generic E rror Recei ved:  " _  $char(10)  _ sStatus  _ $char(10 ) _ sRespo nseBody)
  83                                                        se t exceptio n = ##clas s(%Excepti on.General ).%New("eC AMS Except ion",sStat us,, sResp onseBody )
  84                                                        th row except ion
  85                                                }
  86                                       }
  87                                       else{
  88                                                set sError  = "No res ponse body  received  from eCAMS "
  89                                                $$$LOGERRO R(sError)
  90                                                set except ion = ##cl ass(%Excep tion.Gener al).%New(" eCAMS Exce ption","60 0",, sErro r )
  91                                                throw exce ption
  92                                       }
  93                              }              
  94               }
  95               catch ex {
  96                              Set tS C = ex.AsS tatus()
  97                              $$$LOG ERROR("Err or sending  message t o eCAMS: "  _ tSC)
  98               }
  99                     
  100               return tSC
  101    }
  102   
  103    XData Mess ageMap
  104    {
  105    <MapItems>
  106                     <Map Item Messa geType="eC AMS.Messag e.eCAMSRef erralReque st"> 
  107                              <Metho d>OnMessag e</Method>
  108                     </Ma pItem>
  109            </ MapItems>
  110    }
  111   
  112    }