11. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 6/18/2018 3:36:59 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.

11.1 Files compared

# Location File Last Modified
1 CTT_DM2_v7.zip\CTT_ISAAC\hl7-messaging\src\main\java\gov\vha\isaac\ochre\deployment\hapi\extension VetsMfnM01.java Tue Jun 12 16:42:48 2018 UTC
2 CTT_DM2_v7.zip\CTT_ISAAC\hl7-messaging\src\main\java\gov\vha\isaac\ochre\deployment\hapi\extension VetsMfnM01.java Thu Jun 14 16:05:14 2018 UTC

11.2 Comparison summary

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

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

11.4 Active regular expressions

No regular expressions were active.

11.5 Comparison detail

  1   /**
  2    * Copyrig ht Notice
  3    *
  4    * This is  a work of  the U.S.  Government  and is no t subject  to copyrig ht
  5    * protect ion in the  United St ates. Fore ign copyri ghts may a pply.
  6    *
  7    * License d under th e Apache L icense, Ve rsion 2.0  (the "Lice nse");
  8    * you may  not use t his file e xcept in c ompliance  with the L icense.
  9    * You may  obtain a  copy of th e License  at
  10    *
  11    * http:// www.apache .org/licen ses/LICENS E-2.0
  12    *
  13    * Unless  required b y applicab le law or  agreed to  in writing , software
  14    * distrib uted under  the Licen se is dist ributed on  an "AS IS " BASIS,
  15    * WITHOUT  WARRANTIE S OR CONDI TIONS OF A NY KIND, e ither expr ess or imp lied.
  16    * See the  License f or the spe cific lang uage gover ning permi ssions and
  17    * limitat ions under  the Licen se.
  18    */
  19   package go v.vha.isaa c.ochre.de ployment.h api.extens ion;
  20  
  21   import org .apache.lo gging.log4 j.LogManag er;
  22   import org .apache.lo gging.log4 j.Logger;
  23  
  24   import ca. uhn.hl7v2. HL7Excepti on;
  25   import ca. uhn.hl7v2. model.Data TypeExcept ion;
  26   import ca. uhn.hl7v2. model.v24. group.MFN_ M01_MF;
  27   import ca. uhn.hl7v2. model.v24. message.MF N_M01;
  28   import ca. uhn.hl7v2. model.v24. segment.MF E;
  29   import ca. uhn.hl7v2. model.v24. segment.MF I;
  30   import ca. uhn.hl7v2. model.v24. segment.MS H;
  31   import gov .vha.isaac .ochre.ser vices.dto. publish.Ap plicationP roperties;
  32   import gov .vha.isaac .ochre.ser vices.dto. publish.Me ssagePrope rties;
  33  
  34   /**
  35    * @author   PII
  36    */
  37  
  38   public cla ss VetsMfn M01 extend s MFN_M01
  39   {
  40           pr ivate stat ic Logger  LOG = LogM anager.get Logger(Vet sMfnM01.cl ass);
  41  
  42           /* *
  43            *  Creates a  new MFN_M 01 Group.
  44            * /
  45           pu blic VetsM fnM01() {
  46                    try  {
  47                             this.a dd(MSH.cla ss, true,  false);
  48                             this.a dd(MFI.cla ss, true,  false);
  49                             this.a dd(MFN_M01 _MF.class,  true, tru e);
  50                             this.a dd(VetsMfn M01Mfezxx. class, tru e, true);
  51                    } ca tch (HL7Ex ception e)  {
  52                             LOG.er ror("Unexp ected erro r creating  VetsMfnM0 1 - this i s probably  a bug in  the source  code gene rator.", e );
  53                    }
  54           }
  55  
  56           pu blic VetsM fnM01Mfezx x getVetsM fnM01Mfezx x() {
  57                    Vets MfnM01Mfez xx ret = n ull;
  58                    try  {
  59                             ret =  (VetsMfnM0 1Mfezxx) t his.get("f ezxx");
  60                    } ca tch (HL7Ex ception e)  {
  61                             LOG.er ror("Unexp ected erro r accessin g data - t his is pro bably a bu g in the s ource code  generator .", e);
  62                    }
  63                    retu rn ret;
  64           }
  65  
  66           /* *
  67            *  Returns a  specific  repetition  of MFN_M0 1_MFEZxx ( a Group ob ject) -
  68            *  creates i t if neces sary throw s HL7Excep tion if th e repetiti on request ed
  69            *  is more t han one gr eater than  the numbe r of exist ing repeti tions.
  70            * /
  71           pu blic VetsM fnM01Mfezx x getVetsM fnM01Mfezx x(int rep)  throws HL 7Exception  {
  72                    retu rn (VetsMf nM01Mfezxx ) this.get ("fezxx",  rep);
  73           }
  74  
  75           /* *
  76            *  Returns t he number  of existin g repetiti ons of Vet sMfnM01Mfe zxx
  77            * /
  78           pu blic int g etVetsMfnM 01MfezxxRe ps() {
  79                    int  reps = -1;
  80                    try  {
  81                             reps =  this.getA ll("fezxx" ).length;
  82                    } ca tch (HL7Ex ception e)  {
  83                             String  message =  "Unexpect ed error a ccessing d ata - this  is probab ly a bug i n the sour ce code ge nerator.";
  84                             LOG.er ror(messag e, e);
  85                             throw  new Error( message);
  86                    }
  87                    retu rn reps;
  88           }
  89  
  90           /* *
  91            *  Populates  the MSH s egment of  the messag e header
  92            *  
  93            *  @param me ssage
  94            *              Message  to which t he MSH seg ment will  be added
  95            *  @param hl 7DateStrin g
  96            *              Date thi s message  was create d
  97            *  @throws D ataTypeExc eption
  98            * /
  99           pu blic void  addMshSegm ent(VetsMf nM01 messa ge, String  hl7DateSt ring, Appl icationPro perties ap plicationP roperties,
  100                             Messag ePropertie s messageP roperties)  throws Da taTypeExce ption {
  101                    
  102                    Stri ng namespa ceId = nul l;
  103                    Stri ng sending FacilityId  = null;
  104                    Stri ng receivi ngApplicat ionNamespa ceId = nul l;
  105                    Stri ng version Id = null;
  106                    Stri ng acceptA cknowledge mentType =  null;
  107                    Stri ng applica tionAcknow ledgementT ype = null ;
  108                    Stri ng country Code = nul l;
  109  
  110                    MSH  msh = mess age.getMSH ();
  111  
  112                    // T his is a s tatic valu e that wil l not chan ge
  113                    msh. getFieldSe parator(). setValue(" ^");
  114  
  115                    // T his is a s tatic valu e that wil l not chan ge
  116                    msh. getEncodin gCharacter s().setVal ue("~|\\&" );
  117  
  118                    // M SH.3.1
  119                    name spaceId =  messagePro perties.ge tSendingAp plicationN amespaceId Update();
  120                    msh. getSending Applicatio n().getNam espaceID() .setValue( namespaceI d);
  121  
  122                    // M SH.3.3
  123                    // u niversalId Type =
  124                    // H L7SenderPr operties.g etApplicat ionPropert ies("msh.s endingAppl ication.un iversalIdT ype");
  125                    // m sh.getSend ingApplica tion().get UniversalI DType().se tValue(uni versalIdTy pe);
  126  
  127                    // M SH.4.1
  128                    send ingFacilit yId = appl icationPro perties.ge tSendingFa cilityName spaceId();
  129                    msh. getSending Facility() .getNamesp aceID().se tValue(sen dingFacili tyId);
  130  
  131                    // M SH.5.1
  132                    rece ivingAppli cationName spaceId =  messagePro perties.ge tReceiving Applicatio nNamespace IdUpdate() ;
  133                    msh. getReceivi ngApplicat ion().getN amespaceID ().setValu e(receivin gApplicati onNamespac eId);
  134  
  135                    // M SH.6.1 - l eft blank  until time  of deploy ment to Vi stA site(s )
  136                    msh. getReceivi ngFacility ().getName spaceID(). setValue(" ");
  137  
  138                    // M SH.7.1 - l eft blank  until time  of deploy ment to Vi stA site(s )
  139                    msh. getDateTim eOfMessage ().getTime OfAnEvent( ).setValue (hl7DateSt ring);
  140  
  141                    // M SH.9.1
  142                    msh. getMessage Type().get MessageTyp e().setVal ue("MFN");
  143  
  144                    // M SH.9.2
  145                    msh. getMessage Type().get TriggerEve nt().setVa lue("M01") ;
  146  
  147                    // M SH.9.3 - l eft blank  because th is piece w ould be re dundant
  148                    msh. getMessage Type().get MessageStr ucture().s etValue("" );
  149  
  150                    // M SH.10 - le ft blank u ntil time  of deploym ent to Vis tA site(s)
  151                    msh. getMessage ControlID( ).setValue ("");
  152  
  153                    // M SH.11.1 -  'T'EST, 'P 'RODUCTION  or 'D'EBU G - left b lank until  time of
  154                    // d eployment
  155                    msh. getProcess ingID().ge tProcessin gID().setV alue("");
  156  
  157                    // M SH.12.1
  158                    // v ersionId =
  159                    vers ionId = me ssagePrope rties.getV ersionId() ;
  160                    msh. getVersion ID().getVe rsionID(). setValue(v ersionId);
  161  
  162                    // M SH.15 - 'A L' or 'NE'
  163                    acce ptAcknowle dgementTyp e = messag ePropertie s.getAccep tAcknowled gementType ();
  164                    msh. getAcceptA cknowledgm entType(). setValue(a cceptAckno wledgement Type);
  165  
  166                    // M SH.16 - 'A L' or 'NE'
  167                    appl icationAck nowledgeme ntType = m essageProp erties.get Applicatio nAcknowled gementType ();
  168                    msh. getApplica tionAcknow ledgmentTy pe().setVa lue(applic ationAckno wledgement Type);
  169  
  170                    // M SH.17 - Se t this fro m a consta nt
  171                    coun tryCode =  messagePro perties.ge tCountryCo de();
  172                    msh. getCountry Code().set Value(coun tryCode);
  173           }
  174  
  175           /* *
  176            *  Populates  the MFI s egment of  the messag e header
  177            *  
  178            *  @param me ssage
  179            *              Message  to which t he MFI seg ment will  be added
  180            *  @param hl 7DateStrin g
  181            *              Date thi s message  was create d
  182            *  @throws D ataTypeExc eption
  183            * /
  184           pu blic void  addMfiSegm ent(VetsMf nM01 messa ge, String  hl7DateSt ring, Mess agePropert ies messag ePropertie s)
  185                             throws  DataTypeE xception {
  186                    Stri ng masterF ileIdentif ier = null ;
  187                    Stri ng nameOfC odingSyste m = null;
  188                    Stri ng fileLev elEventCod e = null;
  189                    Stri ng respons eLevelCode  = null;
  190  
  191                    MFI  mfi = mess age.getMFI ();
  192  
  193                    // M FI.1.1
  194                    mast erFileIden tifier = m essageProp erties.get MasterFile Identifier ();
  195                    mfi. getMasterF ileIdentif ier().getI dentifier( ).setValue (masterFil eIdentifie r);
  196  
  197                    // M FI.1.3
  198                    name OfCodingSy stem = mes sageProper ties.getNa meOfCoding System();
  199                    mfi. getMasterF ileIdentif ier().getN ameOfCodin gSystem(). setValue(n ameOfCodin gSystem);
  200  
  201                    // M FI.3
  202                    file LevelEvent Code = mes sageProper ties.getFi leLevelEve ntCode();
  203                    mfi. getFileLev elEventCod e().setVal ue(fileLev elEventCod e);
  204  
  205                    // M FI.4.1
  206                    mfi. getEntered DateTime() .getTimeOf AnEvent(). setValue(h l7DateStri ng);
  207  
  208                    // M FI.5.1
  209                    mfi. getEffecti veDateTime ().getTime OfAnEvent( ).setValue (hl7DateSt ring);
  210  
  211                    // M FI.6
  212                    resp onseLevelC ode = mess agePropert ies.getRes ponseLevel Code();
  213                    mfi. getRespons eLevelCode ().setValu e(response LevelCode) ;
  214           }
  215  
  216           /* *
  217            *  populates  the MFE s egment of  the messag e for each  group of  ZRT segmen ts
  218            *  This meth od does no t take the  vuid as a  parameter  for conce pts that d o
  219            *  not have  a VUID - s pecificall y for the  case of up dating the  standard
  220            *  terminolo gy version  file.
  221            *  
  222            *  @param me ssage
  223            *              Message  to which t he MFE seg ment will  be added.
  224            *  @param hl 7DateStrin g
  225            *              Date thi s message  was create d
  226            *  @param su bset
  227            *              Subset n ame
  228            *  @param co nceptName
  229            *              Name of  concept fo r which th e MFE segm ent will b e added
  230            *  @param it eration
  231            *              Ordinal  ranking of  this MFE  segment in  the curre nt message
  232            *  @return M FE segment
  233            *  @throws H L7Exceptio n
  234            * /
  235           pu blic VetsM fnM01Mfezx x addMfeSe gment(Vets MfnM01 mes sage, Stri ng hl7Date String, St ring subse t, String  conceptNam e,
  236                             int it eration, M essageProp erties mes sageProper ties) thro ws HL7Exce ption {
  237                    Stri ng recordL evelEventC ode = null ;
  238  
  239                    Vets MfnM01Mfez xx mfeGrou p = messag e.getVetsM fnM01Mfezx x(iteratio n);
  240  
  241                    MFE  mfe = mfeG roup.getMF E();
  242  
  243                    // g 1R.MFE.1
  244                    reco rdLevelEve ntCode = m essageProp erties.get RecordLeve lEventCode ();
  245                    mfe. getRecordL evelEventC ode().setV alue(recor dLevelEven tCode);
  246  
  247                    // g 1R.MFE.3.1
  248                    // m fe.getEffe ctiveDateT ime().getT imeOfAnEve nt().setVa lue(hl7Dat eString);
  249  
  250                    // g 1R.MFE.4
  251                    mfe. getPrimary KeyValueMF E(0).setDa ta(mfeGrou p.getCeObj ect(subset , message) );
  252  
  253                    retu rn mfeGrou p;
  254           }
  255  
  256           /* *
  257            *  Populates  the MFE s egment of  the messag e for each  group of  ZRT segmen ts
  258            *  
  259            *  @param me ssage
  260            *              Message  to which t he MFE seg ment will  be added.
  261            *  @param hl 7DateStrin g
  262            *              Date thi s message  was create d
  263            *  @param su bset
  264            *              Subset n ame
  265            *  @param co nceptVuid
  266            *              VUID of  the concep t for whic h the MFE  segment wi ll be adde d
  267            *  @param co nceptName
  268            *              Name of  concept fo r which th e MFE segm ent will b e added
  269            *  @param it eration
  270            *              Ordinal  ranking of  this MFE  segment in  the curre nt message
  271            *  @return M FE segment
  272            *  @throws H L7Exceptio n
  273            * /
  274           pu blic VetsM fnM01Mfezx x addMfeSe gment(Vets MfnM01 mes sage, Stri ng hl7Date String, St ring subse t,
  275                             String  conceptVu idString,  String con ceptName,  int iterat ion, Messa geProperti es message Properties )
  276                             throws  HL7Except ion {
  277                    Stri ng recordL evelEventC ode = null ;
  278  
  279                    Vets MfnM01Mfez xx mfeGrou p = messag e.getVetsM fnM01Mfezx x(iteratio n);
  280  
  281                    MFE  mfe = mfeG roup.getMF E();
  282  
  283                    // g 1R.MFE.1
  284                    reco rdLevelEve ntCode = m essageProp erties.get RecordLeve lEventCode ();
  285                    mfe. getRecordL evelEventC ode().setV alue(recor dLevelEven tCode);
  286  
  287                    // g 1R.MFE.3.1
  288                    // m fe.getEffe ctiveDateT ime().getT imeOfAnEve nt().setVa lue(hl7Dat eString);
  289  
  290                    // g 1R.MFE.4
  291                    mfe. getPrimary KeyValueMF E(0).setDa ta(mfeGrou p.getCeObj ect(subset , conceptV uidString,  message,  messagePro perties));
  292  
  293                    retu rn mfeGrou p;
  294           }
  295   }