209. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 5/25/2018 9:22:54 AM 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.

209.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\ZIP\DSM-cif\Direct_API\application\views\api\onboarding\services disclosure.php Tue May 22 13:19:28 2018 UTC
2 C:\AraxisMergeCompare\Pri_re\ZIP\DSM-cif\Direct_API\application\views\api\onboarding\services disclosure.php Thu May 24 22:18:14 2018 UTC

209.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 5 248
Changed 4 10
Inserted 0 0
Removed 0 0

209.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

209.4 Active regular expressions

No regular expressions were active.

209.5 Comparison detail

  1   <?php
  2   /**
  3   * @package  direct-as -a-service
  4   * @subpack age views
  5    * @fileso urce
  6   */ /** */
  7  
  8           $t his->load- >view('api /header');  
  9           $t his->load- >view('api /nav'); 
  10   ?>
  11                                      <h1><a h ref="/onbo arding/doc umentation /" class=" underline" >Documenta tion</a> & rarr; /dis closure -  GET</h1>
  12                                      <h3 styl e="color:  #EF0000;"> This is a  restricted  call and  may only b e used by  authorized  applicati ons.</h3>
  13                                      <p>The d isclosure  web servic e allows a uthorized  applicatio ns to retr ieve discl osure info rmation an d can be a ccessed by  sending a  GET reque st to /dis closure.</ p>
  14                                      <h3>Auth entication </h3>
  15                                      <p>
  16                                               The API au thenticati on utilize d is based  upon hash  message a uthenticat ion code ( HMAC). HMA C is an au thenticati on method  that combi nes a cryp tographic  hash funct ion with a  secret cr yptographi c key. Aft er the suc cessful re gistration  of an app lication o n the API,  a public  and privat e key like  the examp le below w ill be pro visioned f or its use .
  17                                      </p>
  18                                      <p class ="code">
  19                                               Public Key : REDACTED
  20                                               <br/>Priva te Key: RE DACTED
  21                                      </p>
  22                                      <p>
  23                                               On every r equest tha t an appli cation sen ds to the  API they m ust includ e an Autho rization h eader. The  authoriza tion heade r is a str ing that t he API wil l utilize  to confirm  the ident ity, and t he message  content,  of the sen der. The a uthorizati on header  consists o f three pa rts. The f irst part  is the API  identifie r, represe nted by th e word "DA AS", which  stands fo r Direct a s a Servic e. The API  identifie r is follo wed by a s pace that  separates  it from th e identify ing conten t. The ide ntifying c ontent con sists of t he unique  public key  and the b ase64 enco ded HMAC h ash genera ted by the  request c ontent and  the priva te key, de limited by  a colon.  An example  of the au thorizatio n header i s below.
  24                                      </p>
  25                                      <p class ="code">
  26                                               Authorizat ion: DAAS  REDACTED
  27                                      </p>
  28                                      <p>
  29                                               The HMAC s tring is g enerated b y running  an HMAC ha sh functio n on a pla in text st ring and t he applica tion's pri vate key.  The plain  text strin g that mus t be hashe d using HM AC is cons tructed as  follows:
  30                                               <ul>
  31                                                       <l i>HTTP Req uest Type< /li>
  32                                                       <l i>Date</li >
  33                                                       <l i>Content- MD5 (Optio nal)</li>
  34                                                       <l i>URI</li>
  35                                               </ul>
  36                                               These valu es are sep arated by  new line c haracters  ("\n"). An  example o f the plai n text str ing is bel ow:
  37                                      </p>
  38                                      <p class ="code">
  39                                               GET\n06/03 /2013 12:1 3:56 EST\n iB94gawbwU SiZy5FuruI OQ==\n/dis closure/fo rmat/json
  40                                      </p>
  41                                      <p>
  42                                               The string  above is  hashed wit h the appl ication's  private ke y using th e SHA-256  algorithm.  A snippet  of JavaSc ript code  showing an  example o f this is  shown belo w:
  43                                      </p>
  44                                      <p class ="code">
  45                                                var hashSt ring = Cry ptoJS.Hmac SHA256("GE T\n06/03/2 013 12:13: 56 EDT\niB 94gawbwUSi Zy5FuruIOQ ==\n/discl osure/form at/json"," REDACTED ");
  46                                               <br/>var b ase64 = en code64(""+ hashString );
  47                                                <br/>var a uthorizati on = "DAAS   REDACTED :"+base64;
  48                                      </p>
  49                                      <p>
  50                                               In the exa mple above  the Conte nt MD5 is  provided b ut this is  an option al field.  If the Con tent MD5 h eader is n ot specifi ed then th e hash sho uld not ha ve the MD5  specified  either.
  51                                      </p>
  52                                      <h3>Head ers</h3>
  53                                      <div cla ss="column ">
  54                                               <div class ="left">
  55                                                       <u l>
  56                                                                <li> Authorizat ion</li>
  57                                                                <p>
  58                                                                         The fi rst requir ed header  is the Aut horization  header co vered in t he Authent ication se ction at t he top of  this page.
  59                                                                </p>
  60                                                                <li> Date or X- Daas-Date< /li>
  61                                                                <p>
  62                                                                         The se cond requi red header  that must  be includ ed is the  Date heade r. Some br owsers wil l not let  an applica tion speci fy the Dat e header p rogrammati cally, so  in this ca se it is a lso accept able to us e the X-Da as-Date he ader as th e API will  interpret  them inte rchangeabl y. This he ader shoul d be popul ated with  the curren t date and  time, in  any standa rd format  (including  time zone  informati on if not  time zone  agnostic),  when the  GET reques t is submi tted. The  value supp lied in th e Date hea der must m atch the v alue used  in the cre ation of t he hash st ring for t he Authori zation hea der.
  63                                                                </p>
  64                                                       </ ul>
  65                                               </div>
  66                                               <div class ="right">
  67                                                       <u l>
  68                                                                <li> Content-Md 5</li>
  69                                                                <p>
  70                                                                         The op tional hea der is the  Content-M d5 header.  This head er should  contain an  MD5 hash  of the GET  query str ing. If th is header  is specifi ed then it  must also  be includ ed in the  hash strin g for the  authorizat ion header . This ext ra securit y measure  is not typ ically nec essary for  GET reque sts, howev er the opt ion is ava ilable so  that the p arameters  sent in th e GET requ est can be  validated  by the AP I as not h aving been  tampered  with in tr ansit.
  71                                                                </p>
  72                                                       </ ul>
  73                                               </div>
  74                                      </div>
  75                                      <h3>Argu ments</h3>
  76                                      <p>
  77                                               There are  5 argument s that can  be sent t o the disc losure web  service.
  78                                      </p>
  79                                      <div cla ss="column ">
  80                                               <div class ="left">
  81                                                       <u l>
  82                                                                <li> First</li>
  83                                                                <p>
  84                                                                         This i s an optio nal field  to search  for a pati ent with a  set first  name.
  85                                                                </p>
  86                                                                <li> Last</li>
  87                                                                <p>
  88                                                                         This i s an optio nal field  to search  for a pati ent with a  set last  name.
  89                                                                </p>
  90                                                                <li> SSN</li>
  91                                                                <p>
  92                                                                         This o ptional fi eld is for  searching  by patien t SSN.
  93                                                                </p>
  94                                                       </ ul>
  95                                               </div>
  96                                               <div class ="right">
  97                                                       <u l>
  98                                                                <li> Start</li>
  99                                                                <p>
  100                                                                         This o ptional fi eld is a u nix timest amp to spe cify the e arliest ti me in the  log you wa nt to retr ieve.
  101                                                                </p>
  102                                                                <li> End</li>
  103                                                                <p>
  104                                                                         This o ptional fi eld is a u nix timest amp to spe cify the l atest time  in the lo g you want  to retrie ve.
  105                                                                </p>
  106                                                       </ ul>
  107                                               </div>
  108                                      </div>
  109                                      <h3>Exam ple Respon se</h3>
  110                                      <ul>
  111                                               <li>Succes s</li>
  112                                                       <u l>
  113                                                                <li> HTTP-200,  {"request_ id": "8975 ","0":{"re cipient":  "test.euse r@<?PHP ec ho CLINICA L_DOMAIN;? >","first" : "First", "last": "L ast","disc losed": "1 403203517" ,"received ": "140320 3533","tit le": "Summ arization  of Episode  Note","se nt_to": "< ?PHP echo  CLINICAL_D OMAIN;?>",  "received _from": "D epartment  of Veteran s Affairs" , "usernam e": "test. user","fac ility": "D irect Faci lity","pur pose": "TR EATMENT"," ssn": "123 456789","p atient_id" : "12345AB CD" }}</li >
  114                                                       </ ul>
  115                                               <li>Error< /li>
  116                                                       <u l>
  117                                                                <li> HTTP-401,  {"request_ id":"2", " message":  "Access De nied. Auth entication  Failed."} </li>
  118                                                                <li> HTTP-422,  {"request_ id":"5","m essage":"' Start' con tains inva lid input" ,"fields": ["start"]} </li>
  119                                                       </ ul>
  120                                      </ul>
  121                                      <h3>Samp le Code</h 3>
  122                                      <p>
  123                                               The disclo sure web s ervice is  constructe d in the s ame manner  that the  validate w eb service  is. Pleas e click <a  href="/on boarding/d ocumentati on/validat e_example" >here</a>  to be take n to some  sample cod e snippets  for the v alidate we b service  and use th at as a ba sis for cr eating the  disclosur e call.
  124                                      </p>
  125                             </div>
  126                             <?PHP  $this->loa d->view('a pi/footer' ); ?>
  127                    </di v>
  128           </ body>
  129   </html>