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

13.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 VetsMfrM01.java Tue Jun 12 16:42:49 2018 UTC
2 CTT_DM2_v7.zip\CTT_ISAAC\hl7-messaging\src\main\java\gov\vha\isaac\ochre\deployment\hapi\extension VetsMfrM01.java Thu Jun 14 16:07:14 2018 UTC

13.2 Comparison summary

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

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

13.4 Active regular expressions

No regular expressions were active.

13.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. message.MF R_M01;
  27   import ca. uhn.hl7v2. model.v24. segment.MF E;
  28   import ca. uhn.hl7v2. model.v24. segment.MF I;
  29   import ca. uhn.hl7v2. model.v24. segment.MS A;
  30   import ca. uhn.hl7v2. model.v24. segment.MS H;
  31   import ca. uhn.hl7v2. model.v24. segment.QR D;
  32   import gov .vha.isaac .ochre.ser vices.dto. publish.Ap plicationP roperties;
  33   import gov .vha.isaac .ochre.ser vices.dto. publish.Me ssagePrope rties;
  34  
  35   /**
  36    * @author   PII
  37    */
  38  
  39   public cla ss VetsMfr M01 extend s MFR_M01
  40   {
  41           pr ivate stat ic Logger  LOG = LogM anager.get Logger(Vet sMfrM01.cl ass);
  42  
  43           /* *
  44            *  Creates a  new MFR_M 01 Group.
  45            * /
  46           pu blic VetsM frM01() {
  47                    try  {
  48                             this.a dd(MSH.cla ss, true,  false);
  49                             this.a dd(MSA.cla ss, true,  false);
  50                             this.a dd(MFI.cla ss, true,  false);
  51                             this.a dd(MFR_M01 .class, tr ue, true);
  52                             this.a dd(VetsMfr M01Mfezxx. class, tru e, true);
  53                    } ca tch (HL7Ex ception e)  {
  54                             LOG.er ror("Unexp ected erro r creating  VetsMfrM0 1 - this i s probably  a bug in  the source  code gene rator.", e );
  55                    }
  56           }
  57  
  58           pu blic VetsM fnM01Mfezx x getVetsM frM01Mfezx x() {
  59                    Vets MfnM01Mfez xx ret = n ull;
  60                    try  {
  61                             ret =  (VetsMfnM0 1Mfezxx) t his.get("f ezxx");
  62                    } ca tch (HL7Ex ception e)  {
  63                             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);
  64                    }
  65                    retu rn ret;
  66           }
  67  
  68           /* *
  69            *  Returns a  specific  repetition  of MFR_M0 1_MFEZxx ( a Group ob ject) -
  70            *  creates i t if neces sary throw s HL7Excep tion if th e repetiti on request ed
  71            *  is more t han one gr eater than  the numbe r of exist ing repeti tions.
  72            * /
  73           pu blic VetsM frM01Mfezx x getVetsM frM01Mfezx x(int rep)  throws HL 7Exception  {
  74                    retu rn (VetsMf rM01Mfezxx ) this.get ("fezxx",  rep);
  75           }
  76  
  77           /* *
  78            *  Returns t he number  of existin g repetiti ons of Vet sMfnM01Mfe zxx
  79            * /
  80           pu blic int g etVetsMfrM 01MfezxxRe ps() {
  81                    int  reps = -1;
  82                    try  {
  83                             reps =  this.getA ll("fezxx" ).length;
  84                    } ca tch (HL7Ex ception e)  {
  85                             String  message =  "Unexpect ed error a ccessing d ata - this  is probab ly a bug i n the sour ce code ge nerator.";
  86                             LOG.er ror(messag e, e);
  87                             throw  new Error( message);
  88                    }
  89                    retu rn reps;
  90           }
  91           
  92           pu blic void  addMsaSegm ent(VetsMf rM01 messa ge, String  hl7DateSt ring, Appl icationPro perties ap plicationP roperties,
  93                             Messag ePropertie s messageP roperties)  throws Da taTypeExce ption {
  94                    MSA  msa = mess age.getMSA ();
  95                    
  96                    //TO DO determi ne where v alues come  from
  97                    //ex ample: MSA ^AA^10023
  98                    msa. getAcknowl edgementCo de().setVa lue("AA");
  99                    msa. getMessage ControlID( ).setValue ("12345");
  100           }
  101  
  102           /* *
  103            *  Populates  the MSH s egment of  the messag e header
  104            *  
  105            *  @param me ssage
  106            *              Message  to which t he MSH seg ment will  be added
  107            *  @param hl 7DateStrin g
  108            *              Date thi s message  was create d
  109            *  @throws D ataTypeExc eption
  110            * /
  111           pu blic void  addMshSegm ent(VetsMf rM01 messa ge, String  hl7DateSt ring, Appl icationPro perties ap plicationP roperties,
  112                             Messag ePropertie s messageP roperties)  throws Da taTypeExce ption {
  113                    
  114                    Stri ng message Type = nul l;
  115                    Stri ng namespa ceId = nul l;
  116                    Stri ng sending FacilityId  = null;
  117                    Stri ng receivi ngApplicat ionNamespa ceId = nul l;
  118                    Stri ng version Id = null;
  119                    Stri ng acceptA cknowledge mentType =  null;
  120                    Stri ng applica tionAcknow ledgementT ype = null ;
  121                    Stri ng country Code = nul l;
  122  
  123                    MSH  msh = mess age.getMSH ();
  124  
  125                    // T his is a s tatic valu e that wil l not chan ge
  126                    msh. getFieldSe parator(). setValue(" ^");
  127  
  128                    // T his is a s tatic valu e that wil l not chan ge
  129                    msh. getEncodin gCharacter s().setVal ue("~|\\&" );
  130  
  131                    // M SH.3.1
  132                    name spaceId =  messagePro perties.ge tSendingAp plicationN amespaceId SiteData() ;
  133                    msh. getSending Applicatio n().getNam espaceID() .setValue( namespaceI d);
  134  
  135                    // M SH.3.3
  136                    // u niversalId Type =
  137                    // H L7SenderPr operties.g etApplicat ionPropert ies("msh.s endingAppl ication.un iversalIdT ype");
  138                    // m sh.getSend ingApplica tion().get UniversalI DType().se tValue(uni versalIdTy pe);
  139  
  140                    // M SH.4.1
  141                    send ingFacilit yId = appl icationPro perties.ge tSendingFa cilityName spaceId();
  142                    msh. getSending Facility() .getNamesp aceID().se tValue(sen dingFacili tyId);
  143  
  144                    // M SH.5.1
  145                    rece ivingAppli cationName spaceId =  messagePro perties.ge tReceiving Applicatio nNamespace IdSiteData ();
  146                    msh. getReceivi ngApplicat ion().getN amespaceID ().setValu e(receivin gApplicati onNamespac eId);
  147  
  148                    // M SH.6.1 - l eft blank  until time  of deploy ment to Vi stA site(s )
  149                    msh. getReceivi ngFacility ().getName spaceID(). setValue(" ");
  150  
  151                    // M SH.7.1 - l eft blank  until time  of deploy ment to Vi stA site(s )
  152                    msh. getDateTim eOfMessage ().getTime OfAnEvent( ).setValue (hl7DateSt ring);
  153  
  154                    // M SH.9.1
  155                    msh. getMessage Type().get MessageTyp e().setVal ue("MFR");
  156  
  157                    // M SH.9.2
  158                    msh. getMessage Type().get TriggerEve nt().setVa lue("M01") ;
  159  
  160                    // M SH.9.3 - l eft blank  because th is piece w ould be re dundant
  161                    msh. getMessage Type().get MessageStr ucture().s etValue("" );
  162  
  163                    // M SH.10 - le ft blank u ntil time  of deploym ent to Vis tA site(s)
  164                    msh. getMessage ControlID( ).setValue ("");
  165  
  166                    // M SH.11.1 -  'T'EST, 'P 'RODUCTION  or 'D'EBU G - left b lank until  time of
  167                    // d eployment
  168                    mess ageType =  messagePro perties.ge tSiteMessa geType();
  169                    msh. getProcess ingID().ge tProcessin gID().setV alue(messa geType);
  170  
  171                    // M SH.12.1
  172                    // v ersionId =
  173                    vers ionId = me ssagePrope rties.getV ersionId() ;
  174                    msh. getVersion ID().getVe rsionID(). setValue(v ersionId);
  175  
  176                    // M SH.15 - 'A L' or 'NE'
  177                    acce ptAcknowle dgementTyp e = messag ePropertie s.getAccep tAcknowled gementType ();
  178                    msh. getAcceptA cknowledgm entType(). setValue(a cceptAckno wledgement Type);
  179  
  180                    // M SH.16 - 'A L' or 'NE'
  181                    appl icationAck nowledgeme ntType = m essageProp erties.get Applicatio nAcknowled gementType ();
  182                    msh. getApplica tionAcknow ledgmentTy pe().setVa lue(applic ationAckno wledgement Type);
  183  
  184                    // M SH.17 - Se t this fro m a consta nt
  185                    coun tryCode =  messagePro perties.ge tCountryCo de();
  186                    msh. getCountry Code().set Value(coun tryCode);
  187           }
  188  
  189           /* *
  190            *  Populates  the MFI s egment of  the messag e header
  191            *  
  192            *  @param me ssage
  193            *              Message  to which t he MFI seg ment will  be added
  194            *  @param hl 7DateStrin g
  195            *              Date thi s message  was create d
  196            *  @throws D ataTypeExc eption
  197            * /
  198           pu blic void  addMfiSegm ent(VetsMf rM01 messa ge, String  hl7DateSt ring, Stri ng subset,  MessagePr operties m essageProp erties)
  199                             throws  DataTypeE xception {
  200                    Stri ng masterF ileIdentif ier = null ;
  201                    Stri ng fileLev elEventCod e = null;
  202                    Stri ng respons eLevelCode  = null;
  203  
  204                    MFI  mfi = mess age.getMFI ();
  205  
  206                    // M FI.1.1
  207                    mfi. getMasterF ileIdentif ier().getI dentifier( ).setValue (subset);
  208                    
  209                    // M FI.2
  210                    mast erFileIden tifier = m essageProp erties.get MasterFile Identifier ();
  211                    mfi. getMasterF ileApplica tionIdenti fier().get NamespaceI D().setVal ue(masterF ileIdentif ier);
  212  
  213                    // M FI.3
  214                    file LevelEvent Code = mes sageProper ties.getFi leLevelEve ntCode();
  215                    mfi. getFileLev elEventCod e().setVal ue(fileLev elEventCod e);
  216  
  217                    // M FI.4.1
  218                    mfi. getEntered DateTime() .getTimeOf AnEvent(). setValue(h l7DateStri ng);
  219  
  220                    // M FI.5.1
  221                    mfi. getEffecti veDateTime ().getTime OfAnEvent( ).setValue (hl7DateSt ring);
  222  
  223                    // M FI.6
  224                    resp onseLevelC ode = mess agePropert ies.getRes ponseLevel Code();
  225                    mfi. getRespons eLevelCode ().setValu e(response LevelCode) ;
  226           }
  227  
  228           /* *
  229            *  populates  the MFE s egment of  the messag e for each  group of  ZRT segmen ts
  230            *  This meth od does no t take the  vuid as a  parameter  for conce pts that d o
  231            *  not have  a VUID - s pecificall y for the  case of up dating the  standard
  232            *  terminolo gy version  file.
  233            *  
  234            *  @param me ssage
  235            *              Message  to which t he MFE seg ment will  be added.
  236            *  @param hl 7DateStrin g
  237            *              Date thi s message  was create d
  238            *  @param su bset
  239            *              Subset n ame
  240            *  @param co nceptName
  241            *              Name of  concept fo r which th e MFE segm ent will b e added
  242            *  @param it eration
  243            *              Ordinal  ranking of  this MFE  segment in  the curre nt message
  244            *  @return M FE segment
  245            *  @throws H L7Exceptio n
  246            * /
  247           pu blic VetsM frM01Mfezx x addMfeSe gment(Vets MfrM01 mes sage, Stri ng hl7Date String, St ring subse t, String  conceptNam e,
  248                             int it eration, M essageProp erties mes sageProper ties) thro ws HL7Exce ption {
  249                    Stri ng recordL evelEventC ode = null ;
  250  
  251                    Vets MfrM01Mfez xx mfeGrou p = messag e.getVetsM frM01Mfezx x(iteratio n);
  252  
  253                    MFE  mfe = mfeG roup.getMF E();
  254  
  255                    // g 1R.MFE.1
  256                    reco rdLevelEve ntCode = m essageProp erties.get RecordLeve lEventCode ();
  257                    mfe. getRecordL evelEventC ode().setV alue(recor dLevelEven tCode);
  258  
  259                    // g 1R.MFE.3.1
  260                    // m fe.getEffe ctiveDateT ime().getT imeOfAnEve nt().setVa lue(hl7Dat eString);
  261  
  262                    // g 1R.MFE.4
  263                    mfe. getPrimary KeyValueMF E(0).setDa ta(mfeGrou p.getCeObj ect(subset , message) );
  264  
  265                    retu rn mfeGrou p;
  266           }
  267  
  268           /* *
  269            *  Populates  the MFE s egment of  the messag e for each  group of  ZRT segmen ts
  270            *  
  271            *  @param me ssage
  272            *              Message  to which t he MFE seg ment will  be added.
  273            *  @param hl 7DateStrin g
  274            *              Date thi s message  was create d
  275            *  @param su bset
  276            *              Subset n ame
  277            *  @param co nceptVuid
  278            *              VUID of  the concep t for whic h the MFE  segment wi ll be adde d
  279            *  @param co nceptName
  280            *              Name of  concept fo r which th e MFE segm ent will b e added
  281            *  @param it eration
  282            *              Ordinal  ranking of  this MFE  segment in  the curre nt message
  283            *  @return M FE segment
  284            *  @throws H L7Exceptio n
  285            * /
  286           pu blic VetsM frM01Mfezx x addMfeSe gment(Vets MfrM01 mes sage, Stri ng hl7Date String, St ring subse t,
  287                             String  conceptVu idString,  String con ceptName,  int iterat ion, Messa geProperti es message Properties )
  288                             throws  HL7Except ion {
  289                    Stri ng recordL evelEventC ode = null ;
  290  
  291                    Vets MfrM01Mfez xx mfeGrou p = messag e.getVetsM frM01Mfezx x(iteratio n);
  292  
  293                    MFE  mfe = mfeG roup.getMF E();
  294  
  295                    // g 1R.MFE.1
  296                    reco rdLevelEve ntCode = m essageProp erties.get RecordLeve lEventCode ();
  297                    mfe. getRecordL evelEventC ode().setV alue(recor dLevelEven tCode);
  298  
  299                    // g 1R.MFE.3.1
  300                    mfe. getEffecti veDateTime ().getTime OfAnEvent( ).setValue (hl7DateSt ring);
  301  
  302                    // g 1R.MFE.4
  303                    mfe. getPrimary KeyValueMF E(0).setDa ta(mfeGrou p.getCeObj ect(subset , conceptV uidString,  message,  messagePro perties));
  304  
  305                    retu rn mfeGrou p;
  306           }
  307           
  308           /* *
  309            *  Populates  the QRD s egment to  the messag e without  a filter v alue
  310            *  
  311            *  @param me ssage
  312            *              Message  to which t he QRD seg ment will  be added
  313            *  @param hl 7DateStrin g
  314            *              Date thi s message  was create d
  315            *  @param su bsetName
  316            *              Name of  the subset
  317            *  @throws D ataTypeExc eption
  318            * /
  319           pu blic void  addQrdSegm ent(VetsMf rM01 query Message, S tring hl7D ateString,  String re gionName,
  320                             Messag ePropertie s messageP roperties)  throws HL 7Exception , DataType Exception  {
  321                    addF ilteredQrd Segment(qu eryMessage , hl7DateS tring, reg ionName, n ull, messa geProperti es);
  322           }
  323  
  324           /* *
  325            *  Populates  the QRD s egment to  the messag e and incl udes a fil ter value
  326            *  
  327            *  @param me ssage
  328            *              Message  to which t he QRD seg ment will  be added
  329            *  @param hl 7DateStrin g
  330            *              Date thi s message  was create d
  331            *  @param su bsetName
  332            *              Name of  the subset
  333            *  @param fi lterValue
  334            *              Value by  which res ult should  be filter ed
  335            *  @throws D ataTypeExc eption
  336            * /
  337           pu blic void  addFiltere dQrdSegmen t(VetsMfrM 01 queryMe ssage, Str ing hl7Dat eString, S tring regi onName,
  338                             String  filterVal ue, Messag ePropertie s messageP roperties)  throws HL 7Exception , DataType Exception  {
  339  
  340                    Stri ng queryFo rmatCode =  null;
  341                    Stri ng queryPr iority = n ull;
  342                    Stri ng queryId  = null;
  343                    Inte ger quanti tyLimitedR equest = n ull;
  344                    Inte ger quanti tyLimitedR equestUnit s = null;
  345                    Stri ng whoSubj ectFilterI dNumber =  null;
  346                    Stri ng whatDep tDataCodeI dentifier  = null;
  347  
  348                    QRD  qrd = quer yMessage.g etQRD();
  349  
  350                    // Q RD.1.1
  351                    qrd. getQueryDa teTime().g etTimeOfAn Event().se tValue(hl7 DateString );
  352  
  353                    // Q RD.2
  354                    quer yFormatCod e = messag ePropertie s.getQuery FormatCode ();
  355                    qrd. getQueryFo rmatCode() .setValue( queryForma tCode); //  "R"
  356  
  357                    // Q RD.3
  358                    quer yPriority  = messageP roperties. getQueryPr iority();
  359                    qrd. getQueryPr iority().s etValue(qu eryPriorit y); // "I"
  360  
  361                    // Q RD.4
  362                    quer yId = mess agePropert ies.getQue ryId();
  363                    qrd. getQueryID ().setValu e(queryId) ; // "Stan dard Termi nology Que ry"
  364  
  365                    // Q RD.6.1
  366                    qrd. getDeferre dResponseD ateTime(). getTimeOfA nEvent().s etValue("" );
  367  
  368                    // Q RD.7.1
  369                    quan tityLimite dRequest =  messagePr operties.g etQueryLim itedReques tQuantity( );
  370                    if ( quantityLi mitedReque st != null ) {
  371                             qrd.ge tQuantityL imitedRequ est().getQ uantity(). setValue(I nteger.toS tring(quan tityLimite dRequest)) ; // "24"
  372                    }
  373  
  374                    // Q RD.7.2.1
  375                    quan tityLimite dRequestUn its = mess agePropert ies.getQue ryLimitedR equestUnit s();
  376                    if ( quantityLi mitedReque stUnits !=  null) {
  377                             qrd.ge tQuantityL imitedRequ est().getU nits().get Identifier ()
  378                                               .setValue( Integer.to String(qua ntityLimit edRequestU nits)); //  "99999"
  379                    }
  380  
  381                    // Q RD.8.1
  382                    whoS ubjectFilt erIdNumber  = message Properties .getQueryW hoSubjectF ilterIdNum ber();
  383                    qrd. getWhoSubj ectFilter( 0).getIDNu mber().set Value(whoS ubjectFilt erIdNumber ); // "ALL "
  384  
  385                    // Q RD.9.1
  386                    qrd. getWhatSub jectFilter (0).getIde ntifier(). setValue(r egionName) ;
  387  
  388                    // Q RD.9.2
  389                    qrd. getWhatSub jectFilter (0).getTex t().setVal ue(filterV alue);
  390  
  391                    // Q RD.10.1
  392                    what DeptDataCo deIdentifi er = messa geProperti es.getQuer yWhatDepar tmentDataC odeIdentif ier();
  393                    qrd. getWhatDep artmentDat aCode(0).g etIdentifi er().setVa lue(whatDe ptDataCode Identifier ); // "VET S"
  394           }        
  395   }