44. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 3/31/2017 10:45:43 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.

44.1 Files compared

# Location File Last Modified
1 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSUTILS uXML.pas Tue Dec 13 18:26:10 2016 UTC
2 CPRS v31A.zip\CPRS v31A\VITL5_P34_src.zip\Source\VITALSUTILS uXML.pas Fri Mar 31 15:01:47 2017 UTC

44.2 Comparison summary

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

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

44.4 Active regular expressions

No regular expressions were active.

44.5 Comparison detail

  1   unit uXML;
  2   {
  3   ========== ========== ========== ========== ========== ========== ========== ==========
  4   *
  5   *       Ap plication:   CliO
  6   *       Re vision:      $Revisio n: 1 $  $M odtime: 12 /20/07 12: 44p $
  7          Developer:       PII                   
  8   *       Si te:          Hines OI FO
  9   *
  10   *       De scription:   Contains  global XM L text uti lities.
  11   *
  12   *
  13   *       No tes:
  14   *
  15   *
  16   ========== ========== ========== ========== ========== ========== ========== ==========
  17   *       $A rchive: /V itals/5.0  (Version 5 .0)/5.0.23  (Patch 23 )/VITALS_5 _0_23_8/So urce/VITAL SUTILS/uXM L.pas $
  18   *
  19   * $History : uXML.pas  $
  20    * 
  21    * ******* **********   Version  1  ******* **********
  22    * User: V haishandri a Date: 8/ 12/09    T ime: 8:29a
  23    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_8/Sourc e/VITALSUT ILS
  24    * 
  25    * ******* **********   Version  1  ******* **********
  26    * User: V haishandri a Date: 3/ 09/09    T ime: 3:39p
  27    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_6/Sourc e/VITALSUT ILS
  28    * 
  29    * ******* **********   Version  1  ******* **********
  30    * User: V haishandri a Date: 1/ 13/09    T ime: 1:26p
  31    * Created  in $/Vita ls/5.0 (Ve rsion 5.0) /5.0.23 (P atch 23)/V ITALS_5_0_ 23_4/Sourc e/VITALSUT ILS
  32    * 
  33    * ******* **********   Version  1  ******* **********
  34    * User: V haishandri a Date: 5/ 14/07    T ime: 10:30 a
  35    * Created  in $/Vita ls GUI 200 7/Vitals-5 -0-18/VITA LSUTILS
  36    * 
  37    * ******* **********   Version  1  ******* **********
  38    * User: V haishandri a Date: 5/ 16/06    T ime: 5:44p
  39    * Created  in $/Vita ls/VITALS- 5-0-18/Vit alsUtils
  40    * GUI v.  5.0.18 upd ates the d efault vit al type IE Ns with th e local
  41    * values.
  42    * 
  43    * ******* **********   Version  1  ******* **********
  44    * User: V haishandri a Date: 5/ 16/06    T ime: 5:33p
  45    * Created  in $/Vita ls/Vitals- 5-0-18/VIT ALS-5-0-18 /VitalsUti ls
  46    * 
  47    * ******* **********   Version  1  ******* **********
  48    * User: V haishandri a Date: 5/ 24/05    T ime: 5:04p
  49    * Created  in $/Vita ls/Vitals  GUI  v 5.0 .2.1 -5.0. 3.1 - Patc h GMVR-5-7  (CASMed,  CCOW) - De lphi 6/Vit alsUtils
  50    * 
  51    * ******* **********   Version  4  ******* **********
  52    * User: V haishpetit d Date: 10 /27/04   T ime: 9:05a
  53    * Updated  in $/CP M odernizati on/CliO/So urce Code
  54    * Complet ed initial  work for  the renal  controller .
  55    *
  56    * ******* **********   Version  3  ******* **********
  57    * User: V haishpetit d Date: 10 /13/04   T ime: 2:33p
  58    * Updated  in $/CP M odernizati on/CliO/So urce Code
  59    * Finishe d base Ins ert Update  and Query  functions .
  60    *
  61    * ******* **********   Version  2  ******* **********
  62    * User: V haishpetit d Date: 10 /07/04   T ime: 4:49p
  63    * Updated  in $/CP M odernizati on/CliO/So urce Code
  64    * Finishe d prelimin ary work o n Insert a nd have it  functioni ng with bo th
  65    * ADO and  the VistA Broker con nections
  66    *
  67    * ******* **********   Version  1  ******* **********
  68    * User: V haishpetit d Date: 10 /02/04   T ime: 9:46a
  69    * Created  in $/CP M odernizati on/CliO/So urce Code
  70    * Initial  check in
  71    *
  72    *
  73   *
  74   *
  75   ========== ========== ========== ========== ========== ========== ========== ==========
  76   }
  77   interface
  78  
  79   uses
  80     SysUtils ,
  81     Classes,
  82     XMLIntf,
  83     XMLDoc;
  84  
  85   function X MLHeader(c onst AName : string):  string; o verload;
  86   function X MLHeader(c onst AName : string;  AIdentifie rNames, AI dentifierV alues: arr ay of stri ng): strin g; overloa d;
  87  
  88   function X MLFooter(c onst AName : string):  string;
  89  
  90   function X MLElement( const ATag : string;  const AVal ue: string ): string;  overload;
  91   function X MLElement( const ATag : string;  const AVal ue: Intege r): string ; overload ;
  92   function X MLElement( const ATag : string;  const AVal ue: Double ; const AD ecimals: i nteger): s tring; ove rload;
  93   function X MLElement( const ATag : string;  const AVal ue: Boolea n): string ; overload ;
  94   function X MLElement( const ATag : string;  const AVal ue: TDateT ime): stri ng; overlo ad;
  95  
  96   function X MLStream(c onst AXML:  string):  TStringStr eam;
  97  
  98   function X MLDocument (const AXM L: string) : IXMLDocu ment;
  99  
  100   function X MLDateTime (const ADa teTime: TD ateTime):  string;
  101  
  102   function X MLNodeValu e(const AX MLDoc: IXM LDocument;  const ATa g: string) : string;
  103  
  104   function X MLFieldVal ue(AXMLCur rentRecord Node: IXML Node; AFie ldName: st ring): str ing;
  105  
  106   function X MLFirstRec ord(AXMLRe sultsDocum ent: IXMLD ocument):  IXMLNode;
  107  
  108   function X MLNextReco rd(AXMLCur rentRecord Node: IXML Node): IXM LNode;
  109  
  110   function X MLErrorMes sage(const  aErrorMsg Text: stri ng): strin g;
  111  
  112   function X MLSuccessM essage(con st aMsgTex t: string) : string;
  113  
  114   function X MLString(a String: st ring): str ing;
  115  
  116   function G etXMLStatu sValue(aXM LString: s tring): st ring;
  117   function G etXMLNodeV alue(aXMLS tring, aXM LNodeName:  string):  string;
  118  
  119   const
  120     XML_DATE  = 'YYYY-M M-DD';
  121     XML_DATE TIME = 'YY YY-MM-DD h h:mm:ss';
  122     XML_VERS ION = '<?x ml version ="1.0"?>';
  123     XML_STAT US_OK = '< RESULT><ST ATUS>OK</S TATUS></RE SULT>';
  124     XML_STAT US_ERROR =  '<RESULT> <STATUS>ER ROR</STATU S><DB_ENGI NE_ERROR_M ESSAGE>%s< /DB_ENGINE _ERROR_MES SAGE></RES ULT>';
  125  
  126   implementa tion
  127  
  128   uses StrUt ils;
  129  
  130   function B uildElemen t(const AT ag: string ; const AV alue: stri ng): strin g;
  131   {Used inte rnally onc e the elem ent value  is formatt ed to a st ring}
  132   begin
  133     Result : = Format(' <%s>%s</%s >', [ATag,  AValue, A Tag]) + #1 3;
  134   end;
  135  
  136   function X MLHeader(c onst AName : string):  string; o verload;
  137   begin
  138     Result : = XMLHeade r(AName, [ ], []);
  139   end;
  140  
  141   function X MLHeader(c onst AName : string;  AIdentifie rNames, AI dentifierV alues: arr ay of stri ng): strin g;
  142   var
  143     i: integ er;
  144   begin
  145     Result : = AName;
  146  
  147     if High( AIdentifie rNames) >  -1 then
  148       begin
  149         Resu lt := Form at('%s', [ Result]);
  150         i :=  0;
  151         whil e i <= Hig h(AIdentif ierNames)  do
  152           be gin
  153              Result :=  Format('%s  %s=%s', [ Result, AI dentifierN ames[i], A nsiQuotedS tr(AIdenti fierValues [i], '''') ]);
  154              inc(i);
  155           en d;
  156       end;
  157  
  158     Result : = Format(' <%s>', [Re sult]) + # 13;
  159   end;
  160  
  161   function X MLFooter(c onst AName : string):  string;
  162   begin
  163     Result : = Format(' </%s>', [A Name]) + # 13;
  164   end;
  165  
  166   function X MLElement( const ATag : string;  const AVal ue: string ): string;  overload;
  167   begin
  168     Result : = BuildEle ment(ATag,  AValue);
  169   end;
  170  
  171   function X MLElement( const ATag : string;  const AVal ue: Intege r): string ; overload ;
  172   begin
  173     Result : = BuildEle ment(ATag,  Format('% d', [AValu e]));
  174   end;
  175  
  176   function X MLElement( const ATag : string;  const AVal ue: Double ; const AD ecimals: i nteger): s tring; ove rload;
  177   begin
  178     Result : = BuildEle ment(ATag,  Format(Fo rmat('%%0. %df', [ADe cimals]),  [AValue])) ;
  179   end;
  180  
  181   function X MLElement( const ATag : string;  const AVal ue: Boolea n): string ; overload ;
  182   begin
  183     Result : = BuildEle ment(ATag,  BoolToStr (AValue, T rue));
  184   end;
  185  
  186   function X MLElement( const ATag : string;  const AVal ue: TDateT ime): stri ng; overlo ad;
  187   begin
  188     Result : = BuildEle ment(ATag,  FormatDat eTime(XML_ DATETIME,  AValue));
  189   end;
  190  
  191   function X MLDateTime (const ADa teTime: TD ateTime):  string;
  192   begin
  193     Result : = FormatDa teTime(XML _DATETIME,  ADateTime );
  194   end;
  195  
  196   function X MLStream(c onst AXML:  string):  TStringStr eam;
  197   begin
  198     Result : = TStringS tream.Crea te(AXML);
  199   end;
  200  
  201   function X MLDocument (const AXM L: string) : IXMLDocu ment;
  202   begin
  203     Result : = NewXMLDo cument;
  204     Result.L oadFromStr eam(XMLStr eam(AXML)) ;
  205     Result.A ctive := T rue;
  206   end;
  207  
  208   function X MLNodeValu e(const AX MLDoc: IXM LDocument;  const ATa g: string) : string;
  209   var
  210     XMLNode:  IXMLNode;
  211   begin
  212     Result : = '';
  213     XMLNode  := AXMLDoc .DocumentE lement.Chi ldNodes.Fi ndNode(ATa g);
  214     if XMLNo de <> nil  then
  215       if XML Node.IsTex tElement t hen
  216         Resu lt := XMLN ode.NodeVa lue;
  217   end;
  218  
  219   function X MLFieldVal ue(AXMLCur rentRecord Node: IXML Node; AFie ldName: st ring): str ing;
  220   begin
  221     Result : = '';
  222     if AXMLC urrentReco rdNode.Chi ldNodes.Fi ndNode(AFi eldName) < > nil then
  223       if AXM LCurrentRe cordNode.C hildNodes. FindNode(A FieldName) .IsTextEle ment then
  224         Resu lt := AXML CurrentRec ordNode.Ch ildNodes.F indNode(AF ieldName). NodeValue;
  225   end;
  226  
  227   function X MLFirstRec ord(AXMLRe sultsDocum ent: IXMLD ocument):  IXMLNode;
  228   begin
  229     Result : = AXMLResu ltsDocumen t.Document Element.Ch ildNodes.F indNode('R ECORD');
  230   end;
  231  
  232   function X MLNextReco rd(AXMLCur rentRecord Node: IXML Node): IXM LNode;
  233   begin
  234     Result : = AXMLCurr entRecordN ode.NextSi bling;
  235   end;
  236  
  237   function X MLErrorMes sage(const  aErrorMsg Text: stri ng): strin g;
  238   begin
  239     Result : =
  240       XMLHea der('RESUL TS') +
  241       XMLEle ment('STAT US', 'ERRO R') +
  242       XMLEle ment('MESS AGE', aErr orMsgText)  +
  243       XMLFoo ter('RESUL TS');
  244   end;
  245  
  246   function X MLSuccessM essage(con st aMsgTex t: string) : string;
  247   begin
  248     Result : =
  249       XMLHea der('RESUL TS') +
  250       XMLEle ment('STAT US', 'OK')  +
  251       XMLEle ment('MESS AGE', aMsg Text) +
  252       XMLFoo ter('RESUL TS');
  253   end;
  254  
  255   function X MLString(a String: st ring): str ing;
  256   begin
  257     Result : = aString;
  258     Result : = AnsiRepl aceStr(Res ult, '&',  '&amp;');
  259     Result : = AnsiRepl aceStr(Res ult, '<',  '&lt;');
  260     Result : = AnsiRepl aceStr(Res ult, '>',  '&gt;');
  261     Result : = AnsiRepl aceStr(Res ult, '''',  '&apos;') ;
  262     Result : = AnsiRepl aceStr(Res ult, '"',  '&quot;');
  263   end;
  264  
  265   function G etXMLStatu sValue(aXM LString: s tring): st ring;
  266   begin
  267     Result : = GetXMLNo deValue(aX MLString,  'STATUS');
  268   end;
  269  
  270   function G etXMLNodeV alue(aXMLS tring, aXM LNodeName:  string):  string;
  271   begin
  272     try
  273       with L oadXMLData (aXMLStrin g).Documen tElement d o
  274         Resu lt := Chil dValues[aX MLNodeName ];
  275     except
  276       on E:  Exception  do
  277         Resu lt := '';
  278     end;
  279   end;
  280  
  281   end.
  282