93. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 7/10/2017 1:01:45 PM 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.

93.1 Files compared

# Location File Last Modified
1 C:\AraxisMergeCompare\Pri_un\IV-ehmp_cif\MIXCommon\main\src\java\gov\va\med\imaging\mix\webservices\rest\types\v1 DiagnosticReport.java Thu Jun 29 17:22:02 2017 UTC
2 C:\AraxisMergeCompare\Pri_re\IV-ehmp_cif\MIXCommon\main\src\java\gov\va\med\imaging\mix\webservices\rest\types\v1 DiagnosticReport.java Thu Jul 6 15:03:59 2017 UTC

93.2 Comparison summary

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

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

93.4 Active regular expressions

No regular expressions were active.

93.5 Comparison detail

  1   package go v.va.med.i maging.mix .webservic es.rest.ty pes.v1;
  2  
  3   import jav ax.xml.bin d.annotati on.XmlRoot Element;
  4   // import  java.io.Se rializable ;
  5   // import  java.util. ArrayList;
  6   // import  java.util. Iterator;
  7   // import  java.util. List;
  8   // import  java.util. Date;
  9   // import  java.util. SortedSet;
  10   // import  java.util. TreeSet;
  11  
  12   /**
  13    * @author   DNS  TITTOC
  14    *
  15    * This Di agnosticRe port class  is for FH IR Diagnos ticReport  model supp ort.
  16    * It refe rs to Imag ingStudy c hildren, i nstead it  includes a  ShallowSt udy list.
  17    * the Acc ession Num ber hooks  the report  to the st udy(ies)
  18    * Cardina lity: Pati ent 1..* D iagnosticR eport 0..*  ImagingSt udy 0..* S eries 0..*  Instance
  19    *
  20    */
  21   @XmlRootEl ement (nam e="Diagnos ticReport" )
  22   public cla ss Diagnos ticReport  // impleme nts Serial izable, /*  Iterable< ShallowStu dy>,*/ Com parable<Di agnosticRe port>
  23   {       
  24   //      pr ivate stat ic final l ong serial VersionUID  = -518585 1367113539 915L;
  25   //      pr ivate stat ic final c har q = '" ';
  26           pr ivate Stri ng resourc eType="Dia gnosticRep ort"; // F HIR resour ce
  27           pr ivate Inte ger id;                                         // Dia gnostic Re port ID --  accession  is prefer red (if nu ll from th e enterpri se, it wil l be a has hcode of t he full re port)
  28           pr ivate Text Type text;                             // c ontains th e actual r eport (to/ from Imagi ngStudy's  additional  text exte nsion elem ent) -- ne ver null o r empty!
  29           pr ivate Stri ng status= "final";           //  R! regist ered | par tial | fin al | corre cted | app ended | ca ncelled |  entered-in -error --  always fin al
  30           pr ivate Code Type categ ory;                        // S ervice cat egory –- “ radiology” , "ophthal mology", e tc. -- the  disciplin e that pro vided the  report - n ot used in  exchange
  31           pr ivate Code Type code;                             // R ! Code|tex t for this  diagnosti c report –  CPT Or LO INC (by or der filler ); initial ly "RAD|Ra diology Re port"
  32           pr ivate Refe renceType  subject;           //  R! refere nce to the  patient o f the orde r/report - - the ente rprise’s p atient ID  ("Patient/ <icn>" or  "Patient/< edipi>")
  33           pr ivate Stri ng encount er;                         // H ealth care  event whe n  test or dered (dat e-time) –-  can be pr ovided (yy yy-MM-ddTH H:MI:SS+HH :MI UTC fo rmat), but  not requi red
  34           pr ivate Stri ng effecti veDateTime ;       //  when stud y was done  & read (y yyy-MM-ddT HH:MI:SS+H H:MI UTC f ormat) --  for date r ange the s tart value
  35           pr ivate Stri ng issued;                             // R !  DateTim e (yyyy-MM -ddTHH:MI: SS+HH:MI U TC format)  the repor t was rele ased
  36           pr ivate Refe renceType  performer;         //  R!  Respo nsible Dia gnostic Se rvice – “r adiology”,  etc. -- a t least "V HA" or "DO D" must be  set!
  37           pr ivate Stri ng request ;                           // W hat was re quested –-  not maint ained by i mage excha nge
  38           pr ivate Stri ng specime n;                          // S pecimens t his report  is based  on -- –- m ight be us ed for Pat hology –-  not curren tly receiv ed
  39       privat e String r esult;                                 // O bservation s - simple , or compl ex nested  groups –-  not mainta ined by im age exchan ge
  40       privat e String i mage=null;                    //  Key image s associat ed with th is report  {comment,  link //R!}  –- not ma intained f or image e xchange
  41           pr ivate Stri ng conclus ion;                        // C linical In terp. of t est result s – Concis e/clinical ly context ualized na rrative in terp. of t he Diag.Re port - if  avail
  42           pr ivate Stri ng codedDi agnosis;           //  Codes for  the concl usion –- n ot maintai ned by ima ge exchang e
  43           pr ivate Stri ng present edForm;            //  Entire re port as is sued (atta chment) --  not maint ained by i mage excha nge, see f ormattedTe xtReport f ield!
  44           pr ivate Stri ng imaging Study=null ;       //  read only  (non FHIR ) field --  the Imagi ngStudies  SET size
  45           pr ivate Shal lowStudy[]  shallowSt udies; //  for REST c ompliance
  46   //      pr ivate List <ShallowSt udy> shall owStudies  = new Arra yList<Shal lowStudy>( ); // ***  should be  Sorted Lis t?
  47   //      pr ivate Sort edSet<Imag ingStudy>  imagingStu dies = new  TreeSet<I magingStud y>(new Ima gingStudyC omparator( ));
  48  
  49           pu blic Diagn osticRepor t()
  50           {
  51                    text =null; //  new TextTy pe("additi onal", "<d iv>...</di v>");
  52                    enco unter = ef fectiveDat eTime = is sued = req uest = spe cimen = re sult =
  53                              concl usion = co dedDiagnos is = prese ntedForm =  null;
  54                    subj ect = null ; // new R eferenceTy pe("Patien t/{icn}");
  55                    perf ormer = nu ll; // new  Reference Type("Orga nization/V HA");
  56                    id=n ull;
  57                    stat us="final" ;
  58                    code  = null;
  59                    cate gory = nul l;
  60                    imag e=null;
  61                    imag ingStudy=n ull;
  62                    shal lowStudies  = new Sha llowStudy[ 0];
  63           }
  64  
  65  
  66   //      /* *
  67   //       *  Create a  new Diagno sticReport  (no shall owStudy se t, imaging Study and  image stay  null)
  68   //       *  @param re portId acc ession is  preferred  (if null f rom the en terprise,  it will be  a hashcod e of the f ull report )
  69   //       *  @param dT extReport  The actual  report fr om FHIR Im agingStudy 's additio nal text e xtension e lement; sh ould never  be null
  70   //       *  @param dR ID Diagnos tic Report  ID -- aut o set repo rt hashcod e if null  is given - - supposed  to be loc alID from  creator en terprise
  71   //       *  @param dC ategory Se rvice cate gory –- “r adiology”,  "ophthalm ology", et c.- not us ed in exch ange
  72   //       *  @param dC ode Code|t ext For th is diagnos tic report  – CPT Or  LOINC (by  order fill er) or at  least ; "R AD|Radiolo gy Report"
  73   //       *  @param dP atID Patie nt ID of s tudy creat or enterpr ise (ICN f or "VHA",  EDI_PI for  "DOD")
  74   //       *  @param dE nc Health  care event  when test  ordered ( date-time)  –- can be  provided  (yyyy-MM-d dTHH:MI:SS +HH:MI UTC  format),  but not re quired
  75   //       *  @param dE DT When st udy was do ne & read  (yyyy-MM-d dTHH:MI:SS +HH:MI UTC  format) - - for date  range the  start val ue
  76   //       *  @param dI ssued Date Time (yyyy -MM-ddTHH: MI:SS+HH:M I UTC form at) the re port was r eleased
  77   //       *  @param dP erfr Respo nsible Dia gnostic Se rvice – “r adiology”,  etc.; "VH A" or "DOD " at least
  78   //       *  @param dR eq What wa s requeste d –- not m aintained  by image e xchange
  79   //       *  @param dS pecimen Sp ecimens th is report  is based o n -- –- co uld be use d for Path ology
  80   //       *  @param dR esult Obse rvations -  simple, o r complex  nested gro ups –- not  maintaine d by image  exchange
  81   //       *  @param dC oncl Clini cal Interp . of test  results –  concise/cl inically c ontextuali zed narrat ive interp . of the D iag.Report  - if avai l
  82   //       *  @param dC odeDiag Co des for th e conclusi on –- not  maintained  by image  exchange
  83   //       *  @param dP resForm at tachment i s not main tained by  image exch ange, see  formattedT extReport  field!
  84   //       * /
  85   //      pu blic Diagn osticRepor t(Integer  reportId,  String dTe xtReport,  String dCa tegory, St ring dCode , String d PatID, Str ing dEnc,  String dED T, String  dIssued, 
  86   //                             S tring dPer fr, String  dReq, Str ing dSpeci men, Strin g dResult,  String dC oncl, Stri ng dCodeDi ag, String  dPresForm )
  87   //                             t hrows Exce ption
  88   //      {
  89   //               if ( (dTextRepo rt == null ) || dText Report.isE mpty()) {
  90   //                        throw  new Except ion("Forma tted Text  Report (Es caped XHTM L) cannot  be empty." );
  91   //               }
  92   //               if ( (dPatID ==  null) ||  dPatID.isE mpty()) {
  93   //                        throw  new Except ion("Repor t's subjec t(patientI D) cannot  be empty." );
  94   //               }
  95   //               if ( (dCode ==  null) || d Code.isEmp ty()) {
  96   //                        throw  new Except ion("Proce dure Code  cannot be  empty.");
  97   //               }
  98   //               if ( (dIssued = = null) ||  dIssued.i sEmpty())  {
  99   //                        throw  new Except ion("Repor t's releas e date can not be emp ty.");
  100   //               }
  101   //               if ( (dPerfr ==  null) ||  dPerfr.isE mpty()) {
  102   //                        throw  new Except ion("Perfo rmer canno t be empty , use \"VH A\" or \"D OD\".");
  103   //               }
  104   //               this .setText(d TextReport );
  105   //
  106   //               if ( this.id ==  null) { / / set repo rt hashcod e here
  107   //                        this.i d= this.ge tText().ha shCode();
  108   //               } el se
  109   //                        this.i d = report Id;
  110   //               
  111   //               this .setCode(d Code);
  112   //
  113   //               this .status =  "final"; / / hardcode d
  114   //               this .category  = dCategor y;
  115   //               this .setSubjec t(dPatID);
  116   //               this .encounter  = dEnc;
  117   //               this .effective DateTime =  dEDT;
  118   //               this .issued =  dIssued;
  119   //               this .performer  = dPerfr;
  120   //               this .request =  dReq;
  121   //               this .specimen  = dSpecime n;
  122   //               this .result =  dResult;
  123   //               this .image = n ull; // ha rdcoded
  124   //               this .imagingSt udy = null ; // hardc oded
  125   //               this .conclusio n = dConcl ;
  126   //               this .codedDiag nosis = dC odeDiag;
  127   //               this .presented Form = dPr esForm;
  128   //               this .shallowSt udies = ne w ShallowS tudiesType ();
  129   //      }
  130  
  131           pu blic TextT ype getTex t() {
  132   //               Stri ng reportT ext=null;
  133   //               if ( (text!=nul l) && !tex t.isEmpty( )) {
  134   //                        report Text = tex t.substrin g(text.las tIndexOf(" <div>")+1,  text.last IndexOf("< /div>}"));
  135   //               }
  136   //               retu rn reportT ext;
  137                    retu rn text;
  138           }
  139  
  140           pu blic void  setText(Te xtType tex tType) { / / formatte dTextRepor t) {
  141   //      th is.text =  "{\"status \": \"addi tional\",  \"div\": \ "<div>" +  formattedT extReport  + "</div>" \"}"
  142   //               this .text = "{ " +q+"stat us"+q+":"  +q+"additi onal"+q+", " +q+"div" +q+":" +q+ "<div>"+fo rmattedTex tReport+"< /div>"+q+  "}";
  143                    this .text = te xtType;
  144           }
  145  
  146           pu blic Strin g getResou rceType()  {
  147                    retu rn resourc eType;
  148           }
  149  
  150           pu blic Integ er getId()  {
  151                    retu rn id;
  152           }
  153  
  154           pu blic void  setId(Inte ger report Id) {
  155                    this .id = repo rtId;
  156           }
  157  
  158           pu blic Strin g getStatu s() {
  159                    retu rn status;
  160           }
  161  
  162           pu blic CodeT ype getCat egory() {
  163   //               Stri ng codeVal ue=null;
  164   //               if ( (category! =null) &&  !category. isEmpty())  {
  165   //                        codeVa lue = cate gory.subst ring(categ ory.lastIn dexOf(", \ "code\":\" ")+1, cate gory.lastI ndexOf("\" }"));
  166   //               }
  167   //               retu rn codeVal ue;
  168                    retu rn categor y;
  169           }
  170  
  171           pu blic void  setCategor y(CodeType  category)  {
  172   //               this .category  = "[{\"cod e\": [{\"c oding\": { \"system\" : \"http:/ /hl7.org/f hir/v2/007 4\", \"cod e\":\"" +  category +  "\"}]]";
  173   //               this .category  = "[{" +q+ "code"+q+  ": [{" +q+ "coding"+q + ": {" +q +"system"+ q+ ": " +q +"http://h l7.org/fhi r/v2/0074" +q+ ", " + q+"code"+q + ":" +q+c ategory+q+  "}]]";
  174                    this .category  = category ;
  175           }
  176  
  177           pu blic CodeT ype getCod e() {
  178   //               Stri ng codeVal ue=null;
  179   //               if ( (code!=nul l) && !cod e.isEmpty( )) {
  180   //                        codeVa lue = code .substring (code.last IndexOf(",  \"code\": \"")+1, co de.lastInd exOf("\",  \"display\ ""));
  181   //               }
  182   //               retu rn codeVal ue;
  183                    retu rn code;
  184           }
  185  
  186           pu blic void  setCode(Co deType cod e) {
  187   //               this .code = "[ {\"code\":  [{\"codin g\": {\"sy stem\": \" http://hl7 .org/fhir/ v2/0074\",  \"code\": \"" + code  + "\", \" display\":  \"Radiolo gy Report\ "}]";
  188   //               this .code = "[ {" +q+"cod e"+q+ ": [ {" +q+"cod ing"+q+ ":  {" +q+"sy stem"+q+ " : " +q+"ht tp://hl7.o rg/fhir/v2 /0074"+q+  ", " 
  189   //                                                   + q+"code"+q + ":" +q+c ode+q+ ",  " +q+"disp lay"+q+":"  +q+"Radio logy Repor t"+q+ "}]" ;
  190                    this .code = co de;
  191           }
  192  
  193           pu blic Refer enceType g etSubject( ) {
  194   //               Stri ng patient Id=null;
  195   //               if ( (subject!= null) && ! subject.is Empty()) {
  196   //                        patien tId = subj ect.substr ing(subjec t.lastInde xOf("Patie nt/"), sub ject.lastI ndexOf("\" }"));
  197   //               }
  198   //               retu rn patient Id;
  199                    retu rn subject ;
  200           }
  201  
  202           pu blic void  setSubject (Reference Type patRe f) { // (S tring pati entID) {
  203   //               this .subject =  "{\"refer ence\": \" Patient/"  + patientI D + "\"}";
  204   //               this .subject =  "{" +q+"r eference"+ q+": " +q+ "Patient/" +patientID +q + "}";
  205                    this .subject =  patRef;
  206           }
  207  
  208           pu blic Strin g getEncou nter() {
  209                    retu rn encount er;
  210           }
  211  
  212           pu blic void  setEncount er(String  encounter)  {
  213                    this .encounter  = encount er;
  214           }
  215  
  216           pu blic Strin g getEffec tiveDateTi me() {
  217                    retu rn effecti veDateTime ;
  218           }
  219  
  220           pu blic void  setEffecti veDateTime (String ef fectiveDat eTime) {
  221                    this .effective DateTime =  effective DateTime;
  222           }
  223  
  224           pu blic Strin g getIssue d() {
  225                    retu rn issued;
  226           }
  227  
  228           pu blic void  setIssued( String iss ued) {
  229                    this .issued =  issued;
  230           }
  231  
  232           pu blic Refer enceType g etPerforme r() {
  233                    retu rn perform er;
  234           }
  235  
  236           pu blic void  setPerform er(Referen ceType ref Type) { //  (String p erformer)  {
  237   //               this .performer  = "{\"ref erence\":  \"Organiza tion/VHA\" }";
  238   //               this .performer  = "{" +q+ "reference "+q+": " + q+"Organiz ation/VHA" +q+ "}";
  239                    this .performer  = refType ;
  240           }
  241  
  242           pu blic Strin g getReque st() {
  243                    retu rn request ;
  244           }
  245  
  246           pu blic void  setRequest (String re quest) {
  247                    this .request =  request;
  248           }
  249  
  250           pu blic Strin g getSpeci men() {
  251                    retu rn specime n;
  252           }
  253  
  254           pu blic void  setSpecime n(String s pecimen) {
  255                    this .specimen  = specimen ;
  256           }
  257  
  258           pu blic Strin g getResul t() {
  259                    retu rn result;
  260           }
  261  
  262           pu blic void  setResult( String res ult) {
  263                    this .result =  result;
  264           }
  265  
  266           pu blic Strin g getImage () {
  267                    retu rn image;
  268           }
  269  
  270           pu blic Strin g getConcl usion() {
  271                    retu rn conclus ion;
  272           }
  273  
  274           pu blic void  setConclus ion(String  conclusio n) {
  275                    this .conclusio n = conclu sion;
  276           }
  277  
  278           pu blic Strin g getCoded Diagnosis( ) {
  279                    retu rn codedDi agnosis;
  280           }
  281  
  282           pu blic void  setCodedDi agnosis(St ring coded Diagnosis)  {
  283                    this .codedDiag nosis = co dedDiagnos is;
  284           }
  285  
  286           pu blic Strin g getPrese ntedForm()  {
  287                    retu rn present edForm;
  288           }
  289  
  290           pu blic void  setPresent edForm(Str ing presen tedForm) {
  291                    this .presented Form = pre sentedForm ;
  292           }
  293  
  294           pu blic Strin g getImagi ngStudy()  {
  295                    retu rn imaging Study;
  296           }
  297  
  298  
  299           pu blic void  setImaging Study(Stri ng imaging Study) {
  300                    this .imagingSt udy = imag ingStudy;
  301           }
  302  
  303  
  304           pu blic Shall owStudy[]  getShallow Study() {  // use sin gle (not p lural) for  REST JSOJ N translat ion's sake
  305                    retu rn this.sh allowStudi es;
  306           }
  307  
  308           pu blic Integ er getNumb erOfShallo wStudies()  {
  309                    Inte ger num =  0;
  310                    if ( shallowStu dies!=null )
  311                             num =  shallowStu dies.lengt h;
  312                    retu rn num;
  313           }
  314  
  315   //      pu blic void  setShallow Studies(Sh allowStudy [] shallow Studies) {
  316   //               this .shallowSt udies = sh allowStudi es;
  317   //      }
  318           
  319           /* *
  320            *  Add a Sha llowStudy  to the Dia gnosticRep ort as a c hild
  321            *  @param sh allowStudy  a single  ShallowStu dy
  322            * /
  323           pu blic void  addShallow Study(Shal lowStudy s hallowStud y) 
  324           {
  325                    sync hronized(t his.shallo wStudies)
  326                    {
  327                             Shallo wStudy []  shallowStu dyInList =  this.shal lowStudies ;
  328                             int nu mItems=0;
  329                             if (sh allowStudy InList.len gth==0) {
  330                                      shallowS tudyInList  = new Sha llowStudy[ 1];
  331                             } else  {
  332                                      numItems  = shallow StudyInLis t.length;
  333                             }
  334                             Shallo wStudy []  shallowStu dyOutList  = new Shal lowStudy[n umItems+1] ;
  335                             // cop y In list  to Out one  first
  336                             for (i nt i=0; i< numItems;  i++) {
  337                                      shallowS tudyOutLis t[i] = sha llowStudyI nList[i];
  338                             }
  339                             shallo wStudyOutL ist[numIte ms] = shal lowStudy;  // add new  element
  340                             this.s hallowStud ies = shal lowStudyOu tList;
  341                    }
  342           }
  343  
  344   //      /* *
  345   //       *  Append al l of the S hallowStud ies in the  given Set  to the Di agnosticRe port as ch ildren
  346   //       *  @param im agingStudi es is a So rtedSet of  ImagingSt udy
  347   //       * /
  348   //      pu blic void  addShallow Studies(Sh allowStudi esType sha llowStudie s) 
  349   //      {
  350   //               sync hronized(t his.shallo wStudies)
  351   //               {
  352   //                        this.s hallowStud ies.setStu dy(shallow Studies);
  353   //               }
  354   //      }
  355   //
  356   //      @O verride
  357   //      pu blic Itera tor<Shallo wStudy> it erator()
  358   //      {
  359   //               retu rn shallow Studies.ge tStudies() .iterator( );
  360   //      }
  361   //
  362  
  363  
  364           /*  (non-Java doc)
  365            *  @see java .lang.Obje ct#toStrin g()
  366            * /
  367           @O verride
  368           pu blic Strin g toString () 
  369           {
  370                    retu rn "Report ID[" + thi s.id + "]  of patient [" + this. subject +  "]; catego ry=" + thi s.category  + "]; per former=" +  this.perf ormer + ";  Releae Da te/Time="  + this.iss ued + 
  371                                      "; code= " + this.g etCode() +  "; Conclu sion=" + t his.conclu sion + 
  372                                      "#shallo wStudies="  + this.ge tNumberOfS hallowStud ies();
  373           }
  374  
  375           @O verride
  376           pu blic int h ashCode()  {
  377                    fina l int prim e = 31;
  378                    int  result = 1 ;
  379                    resu lt = prime  * result
  380                                      + ((text  == null)  ? 0 : text .hashCode( ));
  381                    resu lt = prime  * result
  382                                      + ((subj ect == nul l) ? 0 : s ubject.has hCode());
  383                    retu rn result;
  384           }
  385  
  386           @O verride
  387           pu blic boole an equals( Object obj ) {
  388                    if ( this == ob j)
  389                             return  true;
  390                    if ( obj == nul l)
  391                             return  false;
  392                    if ( getClass()  != obj.ge tClass())
  393                             return  false;
  394                    fina l Diagnost icReport o ther = (Di agnosticRe port) obj;
  395                    if ( id == null ) {
  396                             if (ot her.id !=  null)
  397                                      return f alse;
  398                    } el se if (!is sued.equal s(other.is sued))
  399                             return  false;
  400                    if ( subject ==  null) {
  401                             if (ot her.subjec t != null)
  402                                      return f alse;
  403                    } el se if (!su bject.equa ls(other.s ubject))
  404                             return  false;
  405                    retu rn true;
  406           }        
  407           
  408   //      @O verride
  409   //      pu blic int c ompareTo(D iagnosticR eport that
  410   //      {
  411   //               retu rn (this.t ext.compar eTo(that.t ext));
  412   //      }
  413   }