51. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/16/2017 1:30:27 PM Eastern Standard 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.

51.1 Files compared

# Location File Last Modified
1 CPRS_Enh_P1.zip OR_3_453 System Design Document NSR 20130504.docx Tue Nov 14 18:19:18 2017 UTC
2 CPRS_Enh_P1.zip OR_3_453 System Design Document NSR 20130504.docx Thu Nov 16 13:53:12 2017 UTC

51.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 4 3654
Changed 3 8
Inserted 0 0
Removed 0 0

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

51.4 Active regular expressions

No regular expressions were active.

51.5 Comparison detail

  1   Provider U tilities v 1.1
  2   System Des ign Docume nt
  3  
  4  
  5  
  6   October 20 17
  7   Version 1. 3
  8  
  9   Department  of Vetera ns Affairs
  10  
  11   Revision H istory
  12   Date
  13   Version
  14   Descriptio n
  15   Author
  16   10/6/2017
  17   1.3
  18   Added anot her securi ty related  RPC and A PI into ro utine.
  19   Rob Davis
  20   08/22/2017
  21   1.2
  22   Added addi tionaly in formation  to GUI sec tion, rele vant to po st-review  improvemen ts.
  23   Scott Step henson
  24   08/16/2017
  25   1.1
  26   Added new  security r elated inf ormation i nto SDD
  27   Scott Step henson
  28   Rob Davis
  29   06/21/2017
  30   1.0
  31   Initial Dr aft
  32   Scott Step henson
  33   Rob Davis
  34  
  35  
  36  
  37   Artifact R ationale
  38   The System  Design Do cument (SD D) is a du al-use doc ument that  provides  the concep tual desig n as well  as the as- built desi gn.  This  document w ill be upd ated as th e product  is built,  to reflect  the as-bu ilt produc t. 
  39  
  40  
  41   When to Co mplete Eac h Section  of the SDD
  42   Section
  43   Completed  On or Befo re PMAS Ph ase
  44   Rationale
  45   1 – Introd uction
  46   MS 0 Revie w; updated  thereafte r
  47   Conceptual  design sh ould infor m evaluati on of inve stments
  48   2 – Backgr ound
  49   MS 0 Revie w; updated  thereafte r
  50   Conceptual  design sh ould infor m evaluati on of inve stments
  51   3 – Concep tual Desig n
  52   MS 0 Revie w; updated  thereafte r
  53   Conceptual  design sh ould infor m evaluati on of inve stments
  54   4 – System  Architect ure
  55   MS 0 Revie w; updated  thereafte r
  56   Conceptual  design sh ould infor m evaluati on of inve stments
  57   5 – Data D esign
  58   MS 1 Revie w; updated  thereafte r
  59   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  60   6 – Detail ed Design
  61   MS 1 Revie w; updated  thereafte r
  62   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  63   7 – Extern al System  Interface  Design
  64   MS 1 Revie w; updated  thereafte r
  65   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  66   8 – Human  Machine In terfaces
  67   MS 1 Revie w; updated  thereafte r
  68   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  69   Attachment s
  70   MS 1 Revie w; updated  thereafte r
  71   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  72  
  73   A product’ s system d esign shou ld be defi ned concep tually pri or to the  allocation  of person nel and re sources th at occur a t project  initiation .  This gi ves the en terprise a n opportun ity to eva luate IT i nvestments  before pr oject team s are stoo d up and f unding is  allocated.   Sections  1- 4 whic h discuss  the high-l evel desig n should b e complete d prior to  MS 0. All  sections  should be  completed  and update d before M S 1.  Proj ects will  need to ad dress all  SDD approv al constra ints prior  to the MS  2 review.   In addit ion, the S DD should  reflect th e as-built  product g oing into  the MS 2 r eview.
  74  
  75   Instructio ns
  76  
  77   Activity
  78   New Capabi lity (1)
  79   Feature En hancement  (2)
  80   Field Depl oyment (A)
  81   Yes
  82   New Applic ation
  83   Cloud/Web  Deployment  (B)
  84   No
  85   No
  86   Mobile App lication ( C)
  87   No
  88   No
  89  
  90   Table of C ontents
  91   1.Introduc tion1
  92   1.1.Scope1
  93   1.2.User P rofiles1
  94   2.Backgrou nd1
  95   2.1.Overvi ew of the  System1
  96   2.2.Overvi ew of the  Business P rocess1
  97   2.3.Overvi ew of the  Significan t Requirem ents2
  98   3.Conceptu al Design2
  99   3.1.Concep tual Appli cation Des ign2
  100   3.1.1.Appl ication Co ntext3
  101   3.1.2.High -Level App lication D esign4
  102   3.1.3.Appl ication Lo cations5
  103   3.2.Concep tual Data  Design6
  104   3.2.1.Proj ect Concep tual Data  Model6
  105   3.2.2.Data base Infor mation6
  106   3.2.3.User  Interface  Data Mapp ing7
  107   3.2.3.1.Ap plication  Screen Int erface7
  108   3.2.3.2.Ap plication  Report Int erface7
  109   3.2.3.3.Un mapped Dat a Element7
  110   3.3.Concep tual Infra structure  Design7
  111   3.3.1.Syst em Critica lity and H igh Availa bility8
  112   3.3.2.Spec ial Techno logy8
  113   3.3.3.Tech nology Loc ations8
  114   3.3.4.Conc eptual Inf rastructur e Diagram8
  115   3.3.4.1.Lo cation of  Environmen ts and Ext ernal Inte rfaces8
  116   3.3.4.2.Co nceptual P roduction  String Dia gram8
  117   4.System A rchitectur e9
  118   4.1.Hardwa re Archite cture9
  119   4.2.Softwa re Archite cture10
  120   4.3.Networ k Architec ture10
  121   4.4.Servic e Oriented  Architect ure / ESS1 1
  122   4.5.Enterp rise Archi tecture11
  123   5.Data Des ign11
  124   5.1.DBMS F iles11
  125   5.2.Non-DB MS Files11
  126   5.3.Data V iew12
  127   6.Detailed  Design12
  128   6.1.Hardwa re Detaile d Design12
  129   6.2.Softwa re Detaile d Design12
  130   6.2.1.Delp hi GUI Cod e Overview 12
  131   6.2.1.1.GU I Vista Re mote Proce dure Calls  (RPC)12
  132   6.2.1.1.1. ORWU DT [N ow]12
  133   6.2.1.1.2. ORQOR DETA IL [OrderI EN, Patien tIEN]12
  134   6.2.1.1.3. ORWU NEWPE RS [Provid er]12
  135   6.2.1.1.4. ORQ3 EN [P roviderIEN , StartDat e, EndDate ]12
  136   6.2.1.1.5. ORQ3 XFER  [Order Lis t]12
  137   6.2.1.1.6. ORWU VERSR V13
  138   6.2.1.1.7. ORWU USERI NFO13
  139   6.2.1.1.8. ORQ3 AUTHU SR13
  140   6.2.1.2.De lphi Units 13
  141   6.2.2.Conc eptual Des ign14
  142   6.2.2.1.Pr oduct Pers pective14
  143   6.2.2.1.1. User Inter faces14
  144   6.2.2.1.2. Hardware I nterfaces1 4
  145   6.2.2.1.3. Software I nterfaces1 5
  146   6.2.2.1.4. Communicat ions Inter faces15
  147   6.2.2.1.5. Memory Con straints15
  148   6.2.2.1.6. Special Op erations15
  149   6.2.2.2.Pr oduct Feat ures15
  150   6.2.2.3.Us er Charact eristics15
  151   6.2.2.4.De pendencies  and Const raints15
  152   6.2.3.Spec ific Requi rements16
  153   6.2.3.1.Da tabase Rep ository16
  154   6.2.3.2.Sy stem Featu res20
  155   6.2.3.2.1. NSR # 2013 0504 – Pro vider Role  Change En hancement2 0
  156   6.2.3.2.1. 1.OR3P4532 0
  157   6.2.3.2.1. 2.ORB3 Rou tine22
  158   6.2.3.2.1. 3.ORCSAVE  Routine24
  159   6.2.3.2.1. 4.ORELR5 R outine28
  160   6.2.3.2.1. 5.ORQ2 Rou tine31
  161   6.2.3.2.1. 6.ORQ3 Rou tine33
  162   6.2.3.2.2. Remote Pro cedure Cal l (RPC)36
  163   6.3.Networ k Detailed  Design37
  164   6.4.Securi ty and Pri vacy38
  165   6.4.1.Secu rity38
  166   6.4.2.Priv acy38
  167   6.5.Servic e Oriented  Architect ure / ESS  Detailed D esign39
  168   7.External  System In terface De sign39
  169   7.1.Interf ace Archit ecture39
  170   7.1.1.GUI  Security39
  171   7.2.Interf ace Detail ed Design3 9
  172   8.Human-Ma chine Inte rface39
  173   8.1.Interf ace Design  Rules39
  174   8.2.Inputs 39
  175   8.3.Output s39
  176   8.4.Naviga tion Hiera rchy40
  177   8.4.1.Main  Form: “Pr ovider Uti lities: Re assign Pat ient Order s”40
  178   8.4.1.1.Us age (optim al program  flow)41
  179   8.4.1.2.Sp ecific fun ctionality 41
  180   8.4.2.Moda l Form: “S elect Curr ent Provid er”42
  181   8.4.3.Moda l Form: Qu alifying O rders43
  182   8.4.4.Moda l Form: Re assign Ord ers (Revie w and Exec ute)44
  183   8.4.5.Moda l Form: Ab out dialog 45
  184   9.Attachme nt A – App roval Sign atures45
  185   A.Addition al Informa tion47
  186   A.1.Identi fication o f Technolo gy and Sta ndards47
  187   A.2.Constr aining Pol icies, Dir ectives an d Procedur es47
  188   A.3.Requir ements Tra ceability  Matrix47
  189   A.4.Packag ing and In stallation 47
  190   A.5.Design  Metrics47
  191  
  192   Introducti on
  193   This docum ent is the  System De sign Docum ent (SDD)  for the Pr ovider Uti lities dev elopment p roject. Se ction 1 co ntains the  purpose,  scope, and  reference s for the  project.
  194   This docum ent will u se the nam es “Provid er Utiliti es” and “P rovider Ro le Change”  interchan geably. “P rovider Ut ilities” i s the file  name of t he executa ble applic ation deli vered to t he custome r. “Provid er Role Ch ange” is t he CPRS me nu item na me by whic h the user  executes  the applic ation. Thi s menu ite m is found  in the CP RS “Tools”  menu,
  195   This is a  living doc ument and  will conti nue to evo lve throug hout the p roject. Th is project  is implem ented util izing agil e methods  which incl ude multip le sprints , or short  developme nt cycles.  This docu ment will  be updated  regularly  during th e developm ent cycle  to reflect  the chang es impleme nted in a  sprint alo ng with ch anges plan ned for fu ture sprin ts.
  196   Scope
  197   As determi ned by sta keholders  during a s eries of i nteractive  meetings,  this prod uct will a llow a use r to move  one or mor e patients  and assoc iated qual ifying ord ers from o ne provide r to anoth er (or sev eral provi ders) for  notificati on purpose s. Scope a nd feature s shall no t exceed t hat functi onality.
  198  
  199   User Profi les
  200   Provider U tilities c an be used  any autho rized VA u ser tasked  with supp orting VA  providers,  but was p rimarily d esigned fo r use by t he followi ng user ty pes:
  201   Clinical A pplication s Coordina tor(CAC).  A CAC may  be tasked  with condu cting admi nistrative  support f or one or  more provi ders. For  example, a  CAC may b e asked to  reassign  qualifying  orders in  the event  of an unp lanned rea ssignment  of a provi der.
  202   Provider.  A provider  may prefe r to perfo rm certain  administr ative task s directly . An examp le would b e a provid er changin g roles wh o wishes t o examine  a list of  patients a nd orders,  and then  individual ly reassig n qualifyi ng orders  based on t he nature  of each pa tient/orde r. 
  203   Background
  204   Overview o f the Syst em
  205   Subject Ma tter Exper ts (SMEs)  from affec ted areas  such as ph ysicians,  nurses and  pharmacis ts as well  as clinic al applica tion coord inators ha ve been in volved in  determinin g the fina l requirem ents and w ill be inv olved in t he field t esting and  approval  of these e nhancement s for rele ase.
  206  
  207   Overview o f the Busi ness Proce ss
  208   Provider U tilities s upports th e followin g business  processes :
  209   Provider R ole Change : The reas signment o f qualifyi ng orders  to another  provider  in the eve nt the ord ering prov ider chang es roles ( and surrog acy is imp racticable ).
  210  
  211  
  212   Overview o f the Sign ificant Re quirements
  213  
  214   Link to th e consolid ated RSD:  http:// DNS /pasdocs/a nalysis/20 150609_CPR S %20 Enhancemen ts %20 Phase %20 I_BRD.zip
  215  
  216   Link to th e NSR:     http:// DNS v/nsrd/Tab _GeneralIn foview.asp ?RequestID =20130504
  217   Link to RT M:      http:// DNS /pasdocs/t raceabilit y/20150609 _CPRS %20 Enhancemen ts %20 Phase %20 I_RTM.xlsx
  218  
  219   Conceptual  Design
  220   Conceptual  Applicati on Design
  221   Provider U tilities i s a standa lone Windo ws applica tion imple mented in  the Delphi  XE8 langu age. It is  completel y independ ent of CPR S. CPRS an d Provider  Utilities  do not co mmunicate  or share d ata. The s ole relati onship bet ween the a pplication s is that  CPRS can “ launch and  forget” P rovider Ut ilities fr om the Too ls menu (P rovider Ro le Change  menu item) .
  222   Provider U tilities c ommunicate s with the  Vista ser ver using  the same c omponent l ibrary as  CPRS. It l ogs into t he server  with the C PRS identi fication k ey. It val idates the  user via  2-factor a uthenticat ion and th e user ID  and pass c ode.
  223   This proje ct compris es changes  in both M  and Delph i.
  224   VISTA Appl ication Co ntext
  225   This appli cation use s the newl y created  “OR PU GUI ” Vista ap plication  context. F or VISTA s ervices, t he existin g CPRS bro ker framew ork is uti lized. 
  226  
  227  
  228    Applicati on Context  Diagram
  229   Table 5 (G rouping):  Applicatio n Context  Descriptio n
  230   Object
  231   ID
  232   Name
  233   Descriptio n
  234   Interface  Name
  235   Interface  System
  236   1
  237   Provider U tiliities
  238  
  239   Computeriz ed Patient  Record Sy stem (CPRS )
  240   Provider U tilities a nd CPRS (1 ) retrieve s and send s clinical  informati on to Vist A (2). Thi s includes  order inf ormation s uch as Pha rmacy Pres criptions.
  241   RPC Broker
  242   VistA
  243   2
  244   VistA
  245   VistA is t he primary  data stor e for Pati ent and He alth relat ed informa tion.  
  246   RPC Broker
  247   CPRS
  248   Interfaces  External  to OIT
  249   CPRS does  not contai n any inte rfaces ext ernal to O IT.
  250   Interfaces  Internal  to OIT
  251   ID
  252   Name
  253   Related Ob ject
  254   Input Mess ages
  255   Output Mes sages
  256   External P arty
  257   1I
  258   RPC Broker
  259   CPRS (1)
  260   VistA (2)
  261   Message co ntaining a  request f or informa tion or or der inform ation
  262   Requested  informatio n, or noti fication o f success.
  263   N/A
  264   High-Level  Applicati on Design
  265  
  266  
  267   High-Level  Applicati on Design
  268  
  269  
  270   Table 6: O bjects in  the High L evel Appli cation Des ign
  271   Objects /  Components  to be Bui lt or Modi fied
  272   Internal D ata Stores
  273   ID
  274   Name
  275   Data Store d
  276   Steward
  277   Access
  278   2 VistA (O rder reass ignment tr acking)
  279   Order Reas signment T racking
  280   From Provi der
  281   To Provide rUser Requ esting Rea ssignment
  282   Date Time  of Reassig nment
  283   OR-Order R eassignmen t Tracking
  284   Create
  285   Retrieve
  286    
  287   Applicatio n Location s
  288   Provider U tilities i s a CPRS a djunct app lication.  As directe d in the G UI SAC doc ument, sit e administ rators are  expected  to install  Provider  Utilities  in the “C: \Program F iles\VISTA \Provider  Utilities”  directory .
  289   Even thoug h Cloud te chnology i s a goal i n reformin g Federal  IT, this p roject wil l not util ize that t echnology  (out of sc ope). In a ddition, r egional de ployments  are used a t various  stations,  however, i t is not t he decisio n of the d evelopment  team. Reg ional depl oyment dec isions are  made by t he regiona l IT staff .
  290   Table 7: A pplication  Locations
  291   Applicatio n Componen t
  292   Descriptio n
  293   Location a t Which Co mponent is  Run
  294   Type
  295   CPRS
  296   Provider R ole Change
  297   Executable
  298   Workstatio ns located  throughou t each VAM C. 
  299   Presentati on Logic a lthough th ere is som e business  logic con tained in  the execut able.
  300   VistA Serv er
  301   Database w hich also  contains t he server  side execu table code  of the Vi stA applic ations.
  302   VistA serv ers are lo cated eith er in loca l VAMCs or  at region al data pr ocessing c enters.
  303   There are  some appli cations th at use the  roll/scro ll present ation logi c. It is a lso the da tabase and  contains  business l ogic and i nterface c ode.
  304   Table 8: A pplication  Users
  305   Applicatio n Componen t
  306   Location
  307   User
  308   Provider R ole Change
  309   CPRS
  310   VistA Serv er
  311   Users for  both CPRS  and the Vi stA server  are locat ed not onl y locally  at each VA MC, but ca n also be  located at  CBOCS or  may be loc ated at re mote locat ion and co nnect thro ugh CAG or  VPN
  312   Physician
  313   Clinical A pplication s Coordina tor
  314   Conceptual  Data Desi gn
  315   Project Co nceptual D ata Model
  316   Project Co nceptual D ata Model
  317  
  318  
  319   Database I nformation
  320   Table 9: D atabase In ventory
  321   Database N ame
  322   Descriptio n
  323   Type
  324   Steward
  325   VistA
  326   M/Cache da tabase con taining cl inical and  non-clini cal data f or all Vis tA applica tion
  327   Modify
  328   Overall, t he VA is t he steward  of the da tabase in  its’ entir ety.
  329   Specifical ly, data i s being mo dified in  data that  is owned b y Pharmacy , CPRS, Ke rnel and L aboratory.
  330   User Inter face Data  Mapping
  331   Applicatio n Screen I nterface
  332   See sectio n 8 for a  full descr iption of  the Provid er Utilite s GUI hier archy.
  333   Applicatio n Report I nterface
  334   N/A.
  335   Unmapped D ata Elemen t
  336   Currently,  there are  no new da ta element s being ad ded that a re not map ped to a u ser interf ace.
  337   Conceptual  Infrastru cture Desi gn
  338  
  339  
  340  
  341   System Cri ticality a nd High Av ailability  
  342   Provider U tilities i s a CPRS a djunct app lication.  CPRS is co nsidered a  mission c ritical sy stem. Howe ver, witho ut the Vis tA databas e and serv ers, CPRS  cannot fun ction. OIT  has desig ned region al data pr ocessing c enters and  ‘hot back up’ sites  for VistA  instances.  This proj ect is not  modifying  those app roaches. A ny modific ation to t hose schem es will be  done outs ide the co nsideratio n of these  enhanceme nts.
  343   Special Te chnology
  344   N/A
  345   Technology  Locations
  346   Table 13:  Technology  Location  Details
  347   Technology  Component
  348   Production  1
  349   Location
  350   Usage
  351   Workstatio ns
  352   VAMCs
  353   CBOCs
  354   Remote (th rough CAG  and VPN)
  355   Clinicians  and suppo rt staff
  356   Special Ha rdware
  357   None
  358  
  359   Interface  Processors
  360   None
  361   None
  362   Legacy Mai nframe
  363   None
  364  
  365   Legacy App lication S erver
  366   None
  367  
  368   Legacy Dat abases
  369   Local
  370   Regional
  371   Houses Vis tA databas e.
  372   Other
  373   None
  374  
  375  
  376  
  377   Conceptual  Infrastru cture Diag ram
  378   Location o f Environm ents and E xternal In terfaces
  379   Currently,  the locat ion of env ironments  varies bet ween VAMCs . Some VAM Cs still h ave local  hardware c onfigurati ons. Many  are conver ted to a r egional da ta process ing setup.  There is  a group re sponsible  for determ ining the  appropriat e configur ation and  scheduling  conversio ns for sit es from lo cal to reg ional depl oyment.
  380   Provider U tilities a nd CPRS is  designed  to fit wit hin whatev er environ ment exist s: either  local or r egional.
  381   Conceptual  Productio n String D iagram
  382  
  383  
  384   Conceptual  Productio n String D iagram
  385   System Arc hitecture
  386   Hardware A rchitectur e
  387   Provider U tilities i s a CPRS a djunct app lication.  It follows  and utili zes CPRS c onventions , describe d below.
  388   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. As  such, it  utilizes t he existin g VistA ha rdware arc hitecture.
  389   Some VistA  instances  are local  to the VA MC that us e it. Othe rs are ins talled in  regional d ata proces sing cente rs. Most o f these in stances ha ve hot bac kup sites  located in  another g eographica lly separa ted locati on.
  390   The primar y architec ture at th is time is  a cluster  of Linux  servers th at act as  the applic ations ser ver. The c lient work stations a re connect ed to this  cluster.  This clust er is conn ected to a  cluster o f VMS serv ers that a ct as the  database s erver wher e the Vist A database  resides.
  391   The client  workstati ons may be  local to  the VAMC o r they may  be remote  at CBOCs,  other VAM Cs (in the  case of i ntegrated  sites) or  may even b e one-off  remote wor kstations  that conne ct via CAG  or VPN.
  392   While pers onnel outs ide of Pro duct Devel opment are  responsib le for det ermining t he best co nfiguratio ns and ens uring adeq uate hardw are and ne twork conn ectivity,  the CPRS v 32 project  considers  additiona l space an d potentia l performa nce impact s. The ult imate goal  is to add  no more t han an add itional 5%  disk spac e or CPU r equirement s.
  393   During the  field tes ting phase , any addi tional fil es created  are monit ored to en sure this  is not exc eeded. Loc al and reg ional IT s taff monit or the sys tems and n otifie CPR S developm ent is the  performan ce exceeds  expectati ons based  on the dev elopment e nvironment .
  394  
  395   Software A rchitectur e
  396   Provider U tilities i s an indep endent Del phi applic ation runn ing under  Windows. I t communic ates with  the VistA  server usi ng existin g CPRS mec hanisms.
  397   The Delphi  GUI appli cation is  a single-t hreaded Wi ndows exec utable wit h a main a nd ancilla ry windows . The wind ow hierarc hy is desc ribed in d etail in s ection 8.
  398   Network Ar chitecture
  399   Provider U tilities i s a CPRS a djunct app lication.  It follows  and utili zes CPRS c onventions , describe d below.
  400   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. Th e executab le portion  of CPRS w ill contin ue communi cate using  the exist ing networ k architec ture that  supports t he legacy  VistA syst ems.
  401   CPRS utili zes remote  procedure  calls (RP Cs) over t he local o r wide are a network  to communi cate betwe en the cli ent and th e VistA in stance. Th is communi cation uti lizes Kern el’s broke r package.
  402   Reference  the hardwa re archite cture for  a high-lev el overvie w of the c ommunicati on pathway s.
  403   Service Or iented Arc hitecture  / ESS
  404   Provider U tilities i s a CPRS a djunct app lication.  It follows  and utili zes CPRS c onventions , describe d below.
  405   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. CP RS is enha ncing the  existing C PRS system .
  406   Note: CPRS ’s archite cture does  not suppl y new serv ices or co nsume serv ices.
  407   Enterprise  Architect ure
  408   Provider U tilities i s a CPRS a djunct app lication.  It follows  and utili zes CPRS c onventions . Provider  Role Chan ge uses De lphi XE8 f or the Del phi develo pment.
  409   The server  side code  is writte n using Ca che/MUMPS,  which is  approved u nder the T RM.
  410   Data Desig n
  411   DBMS Files  
  412   CPRS Provi der Role C hange will  utilize t he existin g FileMan  database.  The follow ing update s have bee n made to  Data Dicti onaries wi thin FileM an.
  413  
  414   Within the  ORDER Fil e (#100),  a new “New  Style” cr oss refere nce “EPRAC DT” has be en created  which is  keyed off  of the PRO VIDER (#10 0.008, 3)  & DATE/TIM E ORDERED  (#100.008,  .01) subf ields of t he ORDER A CTIONS Mul tiple so t hat Orders  can speed ily be ret rieved for  a specifi c Provider  and Date/ Time Order ed for pos sible Re-A ssignment  to one or  more other  Providers .
  415   Also, with in the ORD ER File (# 100), a ne w ORDER TR ANSFERS Mu ltiple (#1 00.011) ha s been cre ated with  each subre cord holdi ng a TRANS FER DATE/T IME (#100. 011, .01)  Date/Time  type field , TRANSFER RED FROM ( #100.011,  .02) point er field,  TRANSFERRE D TO (#100 .011, .03)  pointer f ield, & TR ANSFER USE R (#100.01 1,  .04) p ointer fie ld.  The l atter thre e fields p oint to NE W PERSON F ile (#200) .
  416   As regards  this new  ORDER TRAN SFERS Mult iple just  described  above, a n ew “New St yle” cross  reference  “EPRTRDT”  has been  created wh ich is key ed off of  the TRANSF ERRED TO ( #100.011,  .03) & TRA NSFER DATE /TIME (#10 0.011,  .0 1) subfiel ds to hand le the cas e where an  Order was  Re-assign ed to a Pr ovider, ye t this Pro vider has  to Re-Assi gn the sam e Order to  a 3rd Pro vider.
  417  
  418   Section 6. 2.2 contai ns the spe cifics of  the data d ictionary  updates.
  419  
  420   The files  will be ac cessed eit her by Fil eMan Datab ase Server  (DBS) cal ls or by d irect glob al access,  where app ropriate a nd allowed .
  421   Non-DBMS F iles
  422   N/A
  423   Data View 
  424   There are  no updates  planned f or the per sistent da ta objects  currently  in the re leased ver sion of CP RS. Since  no Entity  Relationsh ip Diagram  (ERD) can  be locate d CPRS wil l construc t a high l evel ERD t o be inclu ded in the  final ver sion of th is documen t.
  425  
  426   Detailed D esign
  427   Hardware D etailed De sign
  428   Provider U tilities w ill use ex isting CPR S hardware  infrastru cture and  will be de signed to  require no  significa nt increas e in data  storage ca pacity or  CPRS resou rces.
  429   Software D etailed De sign 
  430   Delphi GUI  Code Over view
  431   See Sectio n 8 for a  visual ove rview of t he Delphi  GUI window s, to incl ude the fu nctionalit y and spec ified beha vior or ea ch. 
  432   GUI Vista  Remote Pro cedure Cal ls (RPC)
  433   The follow ing RPCs a re used by  the Delph i GUI laye r. Some ar e shared w ith CPRS a nd are use d unmodifi ed. Others  are exclu sive to th is applica tion. See  Section 6  for a deta iled expla nation of  new and mo dified RPC s. Most RP C calls ar e made fro m the Delp hi “Utilit ies.pas” u nit.
  434   ORWU DT [N ow]
  435   Existing C PRS utilit y used unc hanged. Ge ts the ser ver time.  Used by th e GUI’s da te-time co ntrols. Se e the Delp hi “FMNow”  method.
  436   ORQOR DETA IL [OrderI EN, Patien tIEN]
  437   Existing C PRS utilit y used unc hanged. Ge ts order d etails. Us ed by the  GUI’s “Ord er Detail”  window. S ee the Del phi “Order Details” m ethod.
  438   ORWU NEWPE RS [Provid er]
  439   Existing C PRS utilit y used unc hanged. Ge ts a list  of provide rs for use  in the GU I’s curren t and new  provider l ist boxes.  See the D elphi “Sub SetOfProvi ders” meth od.
  440   ORQ3 EN [P roviderIEN , StartDat e, EndDate ]
  441   This is a  new utilit y created  for this a pplication . Gets a l ist of qua lifying or ders issue d by the p rovider du ring the s pecified d ate period . See the  Delphi “Ge tProviderO rdersFromS erver” met hod.
  442   ORQ3 XFER  [Order Lis t]
  443   This is a  new utilit y created  for this a pplication . Transfer s specifie d orders b etween old  and new p roviders.  See the De lphi “reas signOrders ” method.
  444   ORWU VERSR V
  445   Existing C PRS utilit y used unc hanged. Ho wever, thi s applicat ion passes  a unique  applicatio n context,  “OR PU GU I”. The Vi sta server  then rest ricts the  RPCs this  applicatio n is allow ed to acce ss. See th e Delphi “ ServerVers ion” metho d.
  446   This metho d serves a  second pu rpose, as  the applic ation chec ks the ret urned serv er version  to ensure  it suppor ts the req uired RPC  functional ity.
  447   ORWU USERI NFO
  448   Existing C PRS utilit y used unc hanged. Th is gets us er informa tion. This  applicati on only us es the use r timeout  option in  the return ed record  (to suppor t GUI time out functi onality).  See the De lphi “GetU serInfo” m ethod.
  449   ORQ3 AUTHU SR
  450   This is a  new utilit y created  for this a pplication . It verif ies the us er is auth orized to  use Provid er Utiliti es by chec king the “ OR PU ACCE SS” key. S ee the Del phi “IsAut hUser” met hod.
  451   ORQ3 CHKPA TCH
  452   This is a  new utilit y created  for this a pplication . It verif ies to CPR S that OR* 3.0*453 ha s been ins talled on  the M Serv er side.   Other futu re patches  in relati on to Prov ider Role  could upda te this ca ll to incl ude those  patch(es)  as well.
  453  
  454   Delphi Uni ts
  455   ProviderUt ilities.dp r: The Del phi projec t file, wh ich lists  the units  used by th e applicat ion and co ntains pro gram initi alization  code.
  456   ProviderUt ilities.dp roj: The D elphi proj ect config uration fi les. This  is an XML  file conta ining vari ous projec t settings  and infor mation.
  457   ProviderUt ilities.re s: The Del phi projec t resource  file. Con tains stan dard Windo ws resourc e informat ion linked  to the fi nal execut able.
  458   fAbout.pas  & .dfm: T he Delphi  source cod e for the  “About” di alog.
  459   fBase508Di alog.pas &  .dfm: The  Delphi so urce code  for the an cestor to  all popup  dialog win dows.
  460   fBase508Fo rm.pas & . dfm: The D elphi sour ce code fo r the ance stor to al l applicat ion forms.
  461   fReassignO rders.pas  & .dfm: Th e Delphi s ource for  the main w indow.
  462   fApplyChan ges.pas &  .dfm: The  Delphi sou rce code f or the “Re view and A pply Chang es” window .
  463   ProviderEn gine.pas:  The Delphi  source co de for the  provider  engine obj ect. This  object per forms all  non-visual  work invo lved in re assigning  orders.
  464   fConnectTo Server.pas  & .dfm: T he Delphi  source cod e for a co nnection b anner fram e that app ears at th e top of t he main wi ndow durin g startup.
  465   fSelectPro vider.pas  & .dfm: Th e Delphi s ource code  for the f orm to sel ect a new  or current  provider  (and optio nally a qu alified or der date r ange).
  466   fPatientOr ders.pas &  .dfm: The  Delphi so urce code  for the or ders displ ay form. 
  467   fProgramIn formation. pas & .dfm : The Delp hi souce c ode for th e “About”  form.
  468   Utilities. pas: The D elphi sour ce code fo r some sup port utili ties.
  469   fGN_RPCLog .pas & .df m: Borrowe d from Gro up Notes a pplication . A loggin g window f or RPC deb ugging.
  470   UInit.pas:  Manages t imeout fun ctionality . Borrowed  from CPRS .
  471   Conceptual  Design
  472   Product Pe rspective
  473   Link to CP RS EP1 Req uirements
  474   Link to  ( CPRS) v32  Requiremen ts
  475  
  476   User Inter faces
  477   The follow ing three  block diag rams show,  at its si mplest for m the inte rfaces in  use for CP RS. There  will be tw o GUI exec utables: C PRS and Pr ovider Rol e Change.  Both of th ese utiliz e GUI scre ens to com municate w ith users.
  478   For all Vi stA (serve r side) ch anges, the  user inte rface will  be roll a nd scroll.
  479  
  480  
  481   Hardware I nterfaces
  482   Provider U tilities i s a CPRS a djunct app lication. 
  483   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. Pr ovider Uti lities is  enhancing  the existi ng CPRS sy stem. No m odificatio ns to the  existing h ardware in terfaces a re planned .
  484   Currently,  CPRS, uti lizing the  Kernel sy stem will  support an y device t hat Kernel  supports.
  485   Software I nterfaces
  486   Provider U tilities i s a CPRS a djunct app lication. 
  487   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. Pr ovider Uti lities is  enhancing  the existi ng CPRS sy stem.
  488   CPRS commu nicates wi th all the  VistA cli nical appl ications a nd several  of the fi nancial ap plications . In addit ion, CPRS  uses FileM an and Ker nel. CPRS  is written  using the  current n ationally  released v ersion of  each of th ese packag es and pla ns to cont inue to ut ilize and  support th e currentl y released  version.
  489  
  490   Communicat ions Inter faces
  491   Provider U tilities i s a CPRS a djunct app lication. 
  492   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. Pr ovider Uti lities is  enhancing  the existi ng CPRS sy stem. No m odificatio ns will be  made to t he existin g communic ations int erface whi ch are und er the con trol of En gineering.
  493   Memory Con straints
  494   N/A
  495   Special Op erations
  496   N/A
  497   Product Fe atures
  498   Please ref er to Sect ion 2.3 an d Section  8.
  499   User Chara cteristics
  500   Provider U tilities i s a CPRS a djunct app lication.
  501   CPRS is us ed primari ly by clin icians suc h as physi cians, nur ses, physi cian assis tants, nur se practio ners, phar macists an d other an cillary cl inical use rs.
  502   Dependenci es and Con straints
  503  
  504   Provider U tilities m ust utiliz e the exis ting hardw are and ne twork infr astructure . Therefor e, the inc rease in n etwork, me mory, CPU  and data s torage can  not be si gnificant.  Some remo te install ations, su ch as the  CBOCs are  particular ly suscept ible.
  505   Provider U tilities i s not 508  compliant.
  506   Specific R equirement s
  507   Database R epository
  508   The data f or CPRS Pr ovider Rol e Change w ill reside  in the ex isting Vis tA databas e.
  509   Modificati ons (shown  in Yellow ) to Field s in ORDER  ACTIONS M ultiple of  ORDER Fil e (#100):
  510   100.008,.0 1     DATE /TIME ORDE RED      0 ;1 DATE (R equired)
  511  
  512                    INPU T TRANSFOR M:  S %DT= "ETXR" D ^ %DT S X=Y  K:Y<1 X
  513                    LAST  EDITED:       MAY 16 , 2017 
  514       HELP-P ROMPT:       Enter th e date/tim e this act ion was             
  515                           Ordered.
  516       DESCRI PTION:       This is  the date/t ime this a ction was
  517                                        ordere d.  
  518  
  519                    CROS S-REFERENC E:  100^AC T3^MUMPS 
  520   1)= N ORDA  S ORDA=DA (1) D   AC T1^ORDD100 A(ORDA,DA)
  521  
  522   2)= N ORDA  S ORDA=DA (1) D ACT2 ^ORDD100A( ORDA,DA)
  523   ^OR(100,"A CT",ORVP,9 999999- OR LOG,ORDG,O RIFN,DA) 
  524                                      Allows r etrieval o f orders i n
  525                                      reverse- chronologi cal order.   
  526  
  527                    CROS S-REFERENC E:100^AC1^ MUMPS 
  528   1)= N X1,X 2 S X1=DA( 1),X2=DA D  SET^ORDD1 00(X1,X2)
  529  
  530   2)= N X1,X 2 S X1=DA( 1),X2=DA D  KIL^ORDD1 00(X1,X2)
  531                                      ^OR(100, "AC",ORVP, 9999999-OR LOG,ORIFN, DA) 
  532                                      Allows r etrieval o f "active"  orders; i ncludes
  533                                      orders w ith any ki nd of acti ve status,  as   
  534     well as  those that  have ende d w/in the
  535     Active O rders Cont ext Hours.   
  536  
  537                    CROS S-REFERENC E:100^AS1^ MUMPS 
  538   1)= N ORDA  S ORDA=DA (1) D   S1 ^ORDD100(O RDA,DA,"", X)
  539  
  540   2)= N ORDA  S ORDA=DA (1) D  S2^ ORDD100(OR DA,DA,"",X )
  541                                      ^OR(100, "AS",ORVP, 9999999-OR LOG,ORIFN, DA) 
  542                                      Allows r etrieval o f unsigned  orders.  
  543  
  544  
  545                    CROS S-REFERENC E:100^AF 
  546                                      1)= S ^O R(100,"AF" ,$E(X,1,30 ),DA(1),DA )=""
  547                                      2)= K ^O R(100,"AF" ,$E(X,1,30 ),DA(1),DA )
  548  
  549                    RECO RD INDEX:    EPRACDT  (#1454)     REGULAR     IR
  550                                      LOOKUP &  SORTING     WHOLE FI LE (#100)
  551                      Sh ort Descr:   Index on  PROVIDER  & ACTION D ATE/TIME f or
  552                                      Activiti es
  553                      De scription:   This ind ex will be  used as p art of the  new  
  554                                      ORQ3 EN  Remote Pro cedure Cal l to speed ily 
  555                                      pick up  all Orders  for a spe cific Orde ring 
  556                                      Provider  and withi n a date r ange that  has 
  557                                      been sel ected by t he end use r so that  the 
  558                                      Orders t hat come u p can be R e-Assigned  
  559                                      (Transfe rred) to o ne or more  New Provi ders.
  560                         Set Logic:   S ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )=""
  561                       K ill Logic:   K ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )
  562                       W hole Kill:   K ^OR(10 0,"EPRACDT ")
  563                              X(1):   PROVIDER   (100.008 ,3)  (Subs cr 1)  (fo rwards)
  564                              X(2):   DATE/TIM E ORDERED   (100.008, .01)  (Sub scr 2)
  565                                      (forward s)
  566  
  567   100.008,3        PROV IDER              0;3  POINTER T O NEW PERS ON FILE (# 200)
  568  
  569                    LAST  EDITED:     MAY 16,  2017 
  570                    HELP -PROMPT:     Enter th e name of  the reques ting clini cian
  571                                      for this  order. 
  572                    DESC RIPTION:
  573                                      This is  the reques tor of thi s order.  
  574  
  575                    RECO RD INDEX:    EPRACDT  (#1454)     REGULAR     IR
  576                                      LOOKUP &  SORTING     WHOLE FI LE (#100)
  577                      Sh ort Descr:   Index on  PROVIDER  & ACTION D ATE/TIME f or
  578                                      Activiti es
  579                      De scription:   This ind ex will be  used as p art of the  new  
  580                                      ORQ3 EN  Remote Pro cedure Cal l to speed ily 
  581                                      pick up  all Orders  for a spe cific Orde ring 
  582                                      Provider  and withi n a date r ange that  has 
  583                                      been sel ected by t he end use r so that  the 
  584                                      Orders t hat come u p can be R e-Assigned  
  585                                      (Transfe rred) to o ne or more  New Provi ders.
  586                         Set Logic:   S ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )=""
  587                       K ill Logic:   K ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )
  588                       W hole Kill:   K ^OR(10 0,"EPRACDT ")
  589                              X(1):   PROVIDER   (100.008 ,3)  (Subs cr 1)  (fo rwards)
  590                              X(2):   DATE/TIM E ORDERED   (100.008, .01)  (Sub scr 2)
  591                                      (forward s)
  592  
  593   New ORDER  TRANSFERS  Multiple ( along with  New Style  Cross Ref erence) wi thin ORDER  File (#10 0):
  594  
  595   100,70         ORDER  TRANSFERS         11; 0 DATE Mul tiple #100 .011
  596  
  597                  DESCRI PTION:       This is  the list o f Order Tr ansfers th at have
  598                                      occurred  transferr ing to a n ew Provide r from 
  599                                      an old o ne.  
  600  
  601  
  602   100.011,.0 1     TRAN SFER DATE/ TIME     0 ;1 DATE (R equired)
  603  
  604                    INPU T TRANSFOR M:  S %DT= "ETXR" D ^ %DT S X=Y  K:Y<1 X
  605                    LAST  EDITED:       JUN 01 , 2017 
  606                    HELP -PROMPT:       Enter  the Date/T ime of the  Order Tra nsfer. 
  607                    DESC RIPTION:
  608                                        This i s the Date /Time of t he Order
  609                                        Transf er.  
  610  
  611                    CROS S-REFERENC E:  100.01 1^B 
  612                                        1)= S    
  613                                        ^OR(10 0,DA(1),11 ,"B",$E(X, 1,30),DA)= ""
  614                                        2)= K  ^OR(100,DA (1),11,"B" ,$E(X,1,30 ),DA)
  615  
  616                    RECO RD INDEX:      EPRTRD T (#1332)     REGULAR     IR
  617                                        LOOKUP  & SORTING     WHOLE  FILE (#100 )
  618                         Short Desc r:  Index  on TRANSFE RRED TO Pr ovider and    
  619                                        TRANSF ER DATE/TI ME
  620                         Descriptio n:  This i ndex will  be used as  part of t he new
  621                                        ORQ3 E N Remote P rocedure C all to spe edily
  622                                        pick u p all Orde rs which h ave alread y been
  623                                        transf erred from  the origi nal Orderi ng
  624                                        Provid er to one  or more Ne w Provider s in 
  625                                        the ca se where a  New Provi der also h appens 
  626                                        to nee d his or h er Orders  transferre d to a 
  627                                        third  New Provid er, then t his index  can 
  628                                        then b e conduciv e to this  type of sc enario.  
  629                                        It wor ks similar  to EPRACD T Index bu t will 
  630                                        utiliz e TRANSFER RED TO Pro vider & TR ANSFER 
  631                                        DATE/T IME to qui ckly bring  up Orders  for 
  632                                        additi onal Re-As signment ( Transfer).
  633                           Set Logi c:  S ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)=""
  634                          Kill Logi c:  K ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)
  635                          Whole Kil l:  K ^OR( 100,"EPRTR DT")
  636                                X(1 ):  TRANSF ERRED TO   (100.011,. 03)  (Subs cr 1)
  637                                        (forwa rds)
  638                                X(2 ):  TRANSF ER DATE/TI ME  (100.0 11,.01) (S ubscr 
  639                                        2) (fo rwards)
  640  
  641  
  642   100.011,.0 2     TRAN SFERRED FR OM       0 ;2 POINTER  TO NEW PE RSON FILE  (#200)
  643                                         (Requ ired)
  644  
  645                    LAST  EDITED:       MAY 04 , 2017 
  646                    HELP -PROMPT:       Enter  the Provid er that th is Order i s being 
  647                                        Transf erred From
  648                    DESC RIPTION:       This i s the Prov ider that  this Order  is  
  649                                        being  Transferre d From.  
  650  
  651  
  652   100.011,.0 3     TRAN SFERRED TO          0 ;3 POINTER  TO NEW PE RSON FILE  (#200)
  653                                         (Requ ired)
  654  
  655                    LAST  EDITED:       JUN 01 , 2017 
  656                    HELP -PROMPT:       Enter  in the Pro vider that  this Orde r is 
  657                                        being  Transferre d To. 
  658                    DESC RIPTION:       This i s the Prov ider to wh ich this O rder is
  659                                        being  Transferre d.  
  660  
  661                    RECO RD INDEX:      EPRTRD T (#1332)     REGULAR     IR
  662                                        LOOKUP  & SORTING     WHOLE  FILE (#100 )
  663                         Short Desc r:  Index  on TRANSFE RRED TO Pr ovider and    
  664                                        TRANSF ER DATE/TI ME
  665                         Descriptio n:  This i ndex will  be used as  part of t he new
  666                                        ORQ3 E N Remote P rocedure C all to spe edily
  667                                        pick u p all Orde rs which h ave alread y been
  668                                        transf erred from  the origi nal Orderi ng
  669                                        Provid er to one  or more Ne w Provider s in 
  670                                        the ca se where a  New Provi der also h appens 
  671                                        to nee d his or h er Orders  transferre d to a 
  672                                        third  New Provid er, then t his index  can 
  673                                        then b e conduciv e to this  type of sc enario.  
  674                                        It wor ks similar  to EPRACD T Index bu t will 
  675                                        utiliz e TRANSFER RED TO Pro vider & TR ANSFER 
  676                                        DATE/T IME to qui ckly bring  up Orders  for 
  677                                        additi onal Re-As signment ( Transfer).
  678                           Set Logi c:  S ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)=""
  679                          Kill Logi c:  K ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)
  680                          Whole Kil l:  K ^OR( 100,"EPRTR DT")
  681                                X(1 ):  TRANSF ERRED TO   (100.011,. 03)  (Subs cr 1)
  682                                        (forwa rds)
  683                                X(2 ):  TRANSF ER DATE/TI ME  (100.0 11,.01)  ( Subscr 
  684                                        2) (fo rwards)
  685  
  686  
  687   100.011,.0 4     TRAN SFER USER           0 ;4 POINTER  TO NEW PE RSON FILE  (#200)
  688                                         (Requ ired)
  689  
  690                    LAST  EDITED:       MAY 04 , 2017 
  691                    HELP -PROMPT:       Enter  in the Use r that per formed thi s Order 
  692                                        Transf er. 
  693                    DESC RIPTION:       This i s the User  who perfo rmed the O rder
  694                                        Transf er.  
  695  
  696  
  697         FILE S POINTED  TO                        FIELDS
  698  
  699   NEW PERSON  (#200)                   ORDER  TRANSFERS: TRANSFERRE D FROM (#. 02)
  700                                        TRANSF ERRED TO ( #.03)
  701                                        TRANSF ER USER (# .04)
  702  
  703   System Fea tures
  704   Please ref er to the  RSD using  this link:
  705   http:// DNS /pasdocs/a nalysis/20 150609_CPR S %20 Enhancemen ts %20 Phase %20 I_BRD.zip
  706  
  707  
  708   NSR # 2013 0504 – Pro vider Role  Change En hancement
  709   OR3P453
  710   Routines
  711   Activities
  712   Routine Na me
  713   OR3P453
  714   Enhancemen t Category
  715    New
  716    Modify
  717    Delete
  718    No Change
  719   RTM
  720  
  721   Related Op tions
  722   N/A
  723  
  724   Related Ro utines
  725   Routines “ Called By”
  726   Routines “ Called”   
  727  
  728   Called by  Installati on of OR*3 .0*453 by  Installing  User
  729   %ZTLOAD, D DMOD, DIR,  XLFDT, XM D, XPDUTL
  730   Routines
  731   Activities
  732   Data Dicti onary (DD)  Reference s
  733   N/A
  734   Related Pr otocols
  735   N/A
  736   Related In tegration  Control Re gistration s (ICRs)
  737   N/A
  738   Data Passi ng
  739    Input
  740    Output Re ference
  741    Both
  742    Global Re ference
  743    Local
  744   Input Attr ibute Name  and Defin ition
  745   Name:  
  746   Definition
  747   Output Att ribute Nam e and Defi nition
  748   Name:
  749   Definition :
  750  
  751   Current Lo gic
  752   N/A
  753  
  754   Modified L ogic (Chan ges are in  bold)
  755   OR3P453  ; SLC/RBD Po st Install  453 ;07/1 4/17  10:5 2
  756            ; ;3.0;ORDER  ENTRY/RES ULTS REPOR TING;**453 **;Dec 17,  1997
  757            ;
  758   ENV      ;  ensure th at user un derstands  what is ab out to hap pen with c reation
  759            ;  of New St yle cross  reference.
  760            N  DIR,DIRUT ,DTOUT,DUO UT,Y
  761            S  XPDABORT= ""
  762            W  !!,$C(7), "****** Cr eation of  New Style  'EPRACDT'  Cross Refe rence **** **",!
  763            W  !,"This w ill loop t hrough the  ORDER ACT IONS Multi ple of the  entire OR DER"
  764            W  !,"File ( #100) and  create the  'EPRACDT'  New Style  Cross Ref erence bas ed"
  765            W  !,"on the  PROVIDER  & DATE/TIM E ORDERED  sub-fields .",!
  766            W  !,"WARNIN G: Once yo u agree to  create th is, you sh ould let i t run unti l"
  767            W  !,"it has  finished  completely  !!",!
  768            S  DIR("A")= "Are you s ure you wa nt to do t his"
  769            S  DIR("A",1 )="You are  about to  create the  index whi ch could t ake quite  awhile."
  770            S  DIR("B")= "NO"
  771            S  DIR(0)="Y "
  772            D  ^DIR
  773            I  $D(DIRUT) !$D(DTOUT) !$D(DUOUT) !(Y'=1) W  !!,"Ok, I  am stoppin g the inst all." S XP DABORT=1 Q
  774            E   W !,"Ok,  let's con tinue!",!
  775            I  XPDABORT= "" K XPDAB ORT
  776            Q
  777            ;
  778   POST     ;  Post-Inst all for OR *3.0*453
  779            ;  This will  assist wi th EPRACDT  cross ref erence cre ation alon g with
  780            ;  Creation  of new EPR ACDT Indic es
  781            N  ORMSG
  782            S  ORMSG(1)= "This patc h will cre ate a new  New Style  cross refe rence"
  783            S  ORMSG(2)= "called 'E PRACDT' wh ich will b e at the O RDER file  level"
  784            S  ORMSG(3)= "but on PR OVIDER & D ATE/TIME O RDERED sub -fields of  the"
  785            S  ORMSG(4)= "ORDER ACT IONS Multi ple."
  786            S  ORMSG(5)= " "
  787            S  ORMSG(6)= "Creation  of 'EPRACD T' will no w go forwa rd in the"
  788            S  ORMSG(7)= "Backgroun d."
  789            S  ORMSG(8)= " "
  790            S  ORMSG(9)= "You will  be given a  TaskMan t ask # to c heck on or ,"
  791            S  ORMSG(10) ="alternat ely, you c an check y our mail o n MailMan  for a"
  792            S  ORMSG(11) ="message  expressing  Completio n of this  Task with"
  793            S  ORMSG(12) ="appropri ate detail s."
  794            S  ORMSG(13) =" "
  795            S  ORMSG(14) ="Note Ins tall of th is Patch c annot be c onsidered"
  796            S  ORMSG(15) ="Complete  unless an d until th is Task is  Completed ."
  797            S  ORMSG(16) =" "
  798            D  BMES^XPDU TL(.ORMSG)
  799            I  $D(^XTMP( "OR3P453", "START"))  D
  800            .  D MES^XPD UTL("Task  to Create  'EPRACDT'  Already Be gun "_$$HT E^XLFDT(^X
  801   TMP("OR3P4 53","START "))_".")
  802            .  D MES^XPD UTL("")
  803            I  $D(^XTMP( "OR3P453", "FINISH"))  D  Q
  804            .  D MES^XPD UTL("...an d Complete d "_$$HTE^ XLFDT(^XTM P("OR3P453 ","FINISH" ))_".")
  805            .  D MES^XPD UTL("")
  806            Q :$D(^XTMP( "OR3P453") )
  807            S  ZTRTN="SE TXREF^OR3P 453",ZTIO= "",ZTDTH=$ H
  808            S  ZTDESC="C reation of  New Style  X-Ref 'EP RACDT' in  ORDER file " D ^%ZTLO AD
  809            I  $G(ZTSK)  D MES^XPDU TL("Task # "_ZTSK_" q ueued to s tart "_$$H TE^XLFDT($ G(ZTSK("D" )))) I 1
  810            E   D MES^XP DUTL("**** * UNABLE T O QUEUE CR EATION OF  'EPRACDT'  ORDER FILE  X-REF *** **")
  811            K  ZTRTN,ZTI O,ZTDTH,ZT DESC,ZTSK
  812            Q
  813            ;
  814   SETXREF  ;  Set new E PRACDT New  Style cro ss referen ce for old  data
  815            N  DA,DIK,OR IEN,XTMPCN T,XTMPMSG, ZTREQ
  816            K  ^XTMP("OR 3P453")
  817            S  ^XTMP("OR 3P453",0)= $$FMADD^XL FDT($$DT^X LFDT(),90)
  818            S  ^XTMP("OR 3P453","ST ART")=$H
  819            S  XTMPCNT=0
  820            S  XTMPCNT=X TMPCNT+1
  821            S  XTMPMSG=" Creation o f 'EPRACDT ' X-Ref fo r ORDER fi le Started  "
  822            S  XTMPMSG=X TMPMSG_$$H TE^XLFDT(^ XTMP("OR3P 453","STAR T"))_"."
  823            S  ^XTMP("OR 3P453",XTM PCNT)=XTMP MSG
  824            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=" "
  825            K  ^OR(100," EPRACDT")
  826            S  ORIEN=0
  827            F   S ORIEN= $O(^OR(100 ,ORIEN)) Q :'ORIEN  D
  828            .  S DIK="^O R(100,"_OR IEN_",8,", DIK(1)=".0 1^EPRACDT" ,DA(1)=ORI EN D ENALL ^DIK
  829            S  XTMPMSG=" Creation o f 'EPRACDT ' X-Ref Co mpleted."
  830            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=XTMPMS G
  831            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=" "
  832            S  ^XTMP("OR 3P453","FI NISH")=$H
  833            S  XTMPMSG=" Background  Task Fini shed "
  834            S  XTMPMSG=X TMPMSG_$$H TE^XLFDT(^ XTMP("OR3P 453","FINI SH"))_"."
  835            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=XTMPMS G
  836            ;
  837            ;  Send Mail  to instal ler to not ify of com pletion
  838            S  XMSUB="OR *3.0*453 p ost instal l has run  to complet ion."
  839            S  XMDUZ="Pa tch OR*3.0 *453"
  840            S  XTMPCNT=0
  841   XRFLOOP  S  XTMPCNT=$ O(^XTMP("O R3P453",XT MPCNT)) G: XTMPCNT'?1 N.N FIN
  842            S  ^TMP($J," OR3P453",X TMPCNT,0)= ^XTMP("OR3 P453",XTMP CNT)
  843            G  XRFLOOP
  844            ;
  845   FIN      S  XMTEXT="^ TMP($J,""O R3P453"","
  846            S  XMY(DUZ)= "" D ^XMD  K ^TMP($J, "OR3P453")  S ZTREQ=" @"
  847            K  XMDUZ,XMS UB,XMTEXT, XMY
  848            Q
  849            ;
  850  
  851   ORB3 Routi ne
  852   Routines
  853   Activities
  854   Routine Na me
  855   ORB3
  856   Enhancemen t Category
  857    New
  858    Modify
  859    Delete
  860    No Change
  861   RTM
  862  
  863   Related Op tions
  864   N/A
  865  
  866   Related Ro utines
  867   Routines “ Called By”
  868   Routines “ Called”   
  869  
  870   Called by  GMRCP, LR7 ORB3, OCXO CMPG, OCXO Z0I, OCXOZ 0J, OCXOZ0 K, OCXOZ0L , OCXOZ0M,  OCXOZ0N,  OCXOZ0O, O CXOZ0P, OC XOZ0Q, OCX OZ0R, OCXO Z0S, OCXOZ 0T, OCXOZ0 Y, OCXOZ0Z , OCXOZ11,  OCXOZ12,  OCXOZ13, O LDCP, ORAR EN, ORB3LA B, ORB3TIM 1, ORB3TIM 2, ORB3UTL , ORBSMART , ORKCHK,  ORTSKLPS,  ORWDAL32,  ORX3, PSOP KIV1, PXRM NTFY, RAO7 PC4, RAUTL 00, RAUTL1 , RAUTL19,  WVSNOMED,  WVTDALRT
  871   DGCV, ORB3 1, ORB3FN,  ORB3REG,  ORB3SPEC,  ORBSMART,  ORQOR2, OR QPTQ1, SCA PMC, SCMCM HTC, SDUTL 3, VADPT,  XLFDT, XLF STR, XPAR,  XQALBUTL,  XQALERT, 
  872  
  873   Routines
  874   Activities
  875   Data Dicti onary (DD)  Reference s
  876   ^OR(100,   ^ORD(100.9
  877   Related Pr otocols
  878   N/A
  879   Related In tegration  Control Re gistration s (ICRs)
  880   1362
  881   Data Passi ng
  882    Input
  883    Output Re ference
  884    Both
  885    Global Re ference
  886    Local
  887   Input Attr ibute Name  and Defin ition
  888   Name:  ORN
  889   Definition : IEN into  OE/RR NOT IFICATIONS  file (#10 0.9)
  890   Name: ORBD FN
  891   Definition : IEN into  PATIENT f ile (#2)
  892   Name: ORNU M
  893   Definition : IEN into  ORDER fil e (#100)
  894   Name: ORBA DUZ
  895   Definition : Array of  Recipient  DUZs.
  896   Name: ORBP MSG
  897   Definition : Message  Text
  898   Name: ORBP DATA
  899   Definition : Identifi es the pac kage the N otificatio n is based  on.
  900   Output Att ribute Nam e and Defi nition
  901   Name:
  902   Definition :
  903  
  904   Current Lo gic
  905   USER     ; should USE R (ORBDUZ)  be a reci p
  906            D  USER^ORB3 USER(.XQA, ORBDUZ,ORN ,.ORBU,.OR BUI,ORBDFN ,+$G(ORNUM ))
  907            I  $D(ORFORC E(ORBDUZ))  S XQA(ORB DUZ)=""
  908            Q
  909  
  910   Modified L ogic (Chan ges are in  bold)
  911   USER     ; should USE R (ORBDUZ)  be a reci p
  912            ;  RBD OR*3. 0*453 Inte rcept User  (Provider ) to recei ve alert t o see if i t permanen tly routes  to anothe r User (Pr ovider)
  913            ;                    Th en check i f that Use r can rece ive Alerts
  914            N  ORTRDAT,O RTRNUM,ORT RREC I +$G (ORNUM)>0  D
  915            .  S ORTRDAT =$O(^OR(10 0,ORNUM,11 ,"B",$$NOW ^XLFDT()), -1) I +ORT RDAT>0 D
  916            . . S ORTRNU M=$O(^OR(1 00,ORNUM,1 1,"B",ORTR DAT,""),-1 ) I +ORTRN UM>0 D
  917            . .. S ORTRR EC=$G(^OR( 100,ORNUM, 11,ORTRNUM ,0)) I ORT RREC]"" D
  918            . ... I $P(O RTRREC,U,2 )=ORBDUZ,$ P(ORTRREC, U,3) S ORB DUZ=$P(ORT RREC,U,3)
  919            D  USER^ORB3 USER(.XQA, ORBDUZ,ORN ,.ORBU,.OR BUI,ORBDFN ,+$G(ORNUM ))
  920            I  $D(ORFORC E(ORBDUZ))  S XQA(ORB DUZ)=""
  921            Q
  922  
  923   ORCSAVE Ro utine
  924  
  925   Routines
  926   Activities
  927   Routine Na me
  928   ORCSAVE
  929   Enhancemen t Category
  930    New
  931    Modify
  932    Delete
  933    No Change
  934   RTM
  935  
  936   Related Op tions
  937   N/A
  938  
  939   Related Ro utines
  940   Routines “ Called By”
  941   Routines “ Called”   
  942  
  943   CORWDX, GM TSPST2,
  944   JCWDX, JLC WDX,
  945   JORMPS, JO RWDX,
  946   JSGORWDXA,  OR3C100,
  947   ORCACT2, O RCACT4,
  948   ORCDFH, OR CDFHO,
  949   ORCDFHTF,  ORCDLG,
  950   ORCMED, OR CONV3,
  951   ORCSEND, O RCSEND2,
  952   ORCSEND3,  ORMEVNT1,
  953   ORMFH, ORM FH1,
  954   ORMGMRC, O RMLR,
  955   ORMLR1, OR MPS,
  956   ORMPS2, OR MPS3,
  957   ORMRA, ORM VBEC,
  958   ORWD, ORWD FH,
  959   ORWDX, ORW DXA,
  960   ORWDXM, OR WDXR,
  961   ORWDXRBU,  TYBORWDX,
  962   TYORWDX, V EJDVGR1
  963   DIC, DID,  DIQ, HMPOR , ORCD, OR CSAVE1, OR MBLDOR, OR OCAPI1, OR WDPS1, XLF DT
  964  
  965   Routines
  966   Activities
  967   Data Dicti onary (DD)  Reference s
  968   ^DIC(9.4,  ^OR(100,   ^ORD(100.2 , ^ORD(100 .05, ^ORD( 100.7, ^OR D(100.41
  969   Related Pr otocols
  970   N/A
  971   Related In tegration  Control Re gistration s (ICRs)
  972   N/A
  973   Data Passi ng
  974    Input
  975    Output Re ference
  976    Both
  977    Global Re ference
  978    Local
  979   Input Attr ibute Name  and Defin ition
  980   Name: ORDI ALOG
  981   Definition : Array of  Dialog Va lues
  982   Name: ORDG
  983   Definition : Display  Group
  984   Name: ORPK G
  985   Definition : Package
  986   Name: ORCA T
  987   Definition :  Patient  Class
  988   Name: OREV ENT
  989   Definition :  OE/RR P atient Eve nt
  990   Name: ORDU Z
  991   Definition : Who Ente red Order
  992   Name: ORLO G
  993   Definition : When Ord er Entered
  994   Name: CODE
  995   Definition : Action C ode
  996   Name: DA
  997   Definition : IEN of O RDER file  (#100)
  998   Name: PROV
  999   Definition :  Action  Provider
  1000   Name: REAS ON
  1001   Definition : Reason f or Action
  1002   Name: WHEN
  1003   Definition : When Act ion Perfor med
  1004   Name: WHO
  1005   Definition : Who Perf ormed Acti on
  1006   Name: DLG
  1007   Definition : Order Di alog
  1008   Output Att ribute Nam e and Defi nition
  1009   Name: ORIF N
  1010   Definition :  Order N umber
  1011   Name: NEXT
  1012   Definition : Next Act ion Number
  1013   Name: ORPI FN
  1014   Definition : IFN of N ew Parent  Order
  1015  
  1016   Current Lo gic
  1017   EN1, ACTIO N & SET Ta gs affecte d:
  1018  
  1019   EN1      S  ^OR(100,O RIFN,0)=OR IFN_U_ORVP _U_U_$G(OR NP)_U_+ORD IALOG_";OR D(101.41,^
  1020   "_USR_U_LO G_U_U_U_LO C_U_DG_U_C ATG_U_TRSP EC_U_PKG_U _U_SIGNREQ D_U_$G(ORE VENT)_U_$G (ORAPPT)
  1021            S  ^OR(100,O RIFN,3)=LO G_"^90^"_S TS_U_$S($G (ORIT):ORI T_";ORD(10 1.41,",1:"
  1022   ")_U_$G(OR DIALOG("PR EV"))_"^^1 ^^^^"_TYPE
  1023            S  ^OR(100,O RIFN,8,0)= "^100.008D A^1^1",^OR (100,ORIFN ,8,1,0)=LO G_"^NW^"_$
  1024   G(ORNP)_U_ $S(SIGNREQ D:2,1:3)_" ^^^^^^^^"_ NATR_U_USR _"^1^"_STS ,^OR(100,O RIFN,8,"C"
  1025   ,"NW",1)=" "
  1026            S  ^OR(100," AF",LOG,OR IFN,1)=""
  1027  
  1028   ACTION(COD E,DA,PROV, REASON,WHE N,WHO) ; - - save new  action
  1029            N  NEXT,TOTA L,HDR,LAST ,X,PAT,DGR P,SIG,NATR ,TXT S DA= +DA
  1030            Q :'$D(^OR(1 00,DA,0))  0 Q:$G(COD E)'?2U 0
  1031            S :'$G(WHEN)  WHEN=+$E( $$NOW^XLFD T,1,12) S: '$G(WHO) W HO=DUZ
  1032            S  NATR=+$O( ^ORD(100.0 2,"C","E", 0)) ;assum e Elec Ent ered until  changed
  1033            S  PAT=$P(^O R(100,DA,0 ),U,2),DGR P=$P(^(0), U,11),SIG= $P(^(0),U, 16),X=+$P(
  1034   $G(^(3)),U ,7),HDR=$G (^(8,0))
  1035            S :X'>0 X=1  S TXT=$P($ G(^OR(100, DA,8,X,0)) ,U,14) ;cu rrent actn 's txt ptr
  1036            S :HDR="" HD R="^100.00 8DA^^" S T OTAL=+$P(H DR,U,4)
  1037            S  LAST=$O(^ OR(100,DA, 8,"C",CODE ,"?"),-1)  I LAST D
  1038            .  S X=$G(^O R(100,DA,8 ,LAST,0))  Q:$P(X,U,1 5)'=11  Q: $P(X,U,4)' =2
  1039            .  S NEXT=LA ST I PAT,$ P(X,U) D   ; kill old  xref entr ies
  1040            .  . K:DGRP  ^OR(100,"A CT",PAT,(9 999999-$P( X,U)),DGRP ,DA,NEXT)
  1041            .  . K ^OR(1 00,"AC",PA T,(9999999 -$P(X,U)), DA,NEXT),^ OR(100,"AS ",PAT,(999
  1042   9999-$P(X, U)),DA,NEX T),^OR(100 ,"AF",$P(X ,U),DA,NEX T)
  1043            S :'$G(NEXT)  NEXT=$O(^ OR(100,DA, 8,"?"),-1) +1,TOTAL=T OTAL+1
  1044            S  ^OR(100,D A,8,NEXT,0 )=WHEN_U_C ODE_U_$G(P ROV)_U_$S( SIG:2,1:3) _"^^^^^^^^
  1045   "_NATR_U_W HO_U_TXT_" ^11",^OR(1 00,DA,8,"C ",CODE,NEX T)=""
  1046            S  ^OR(100," AF",WHEN,D A,NEXT)=""
  1047  
  1048   SET(DLG) ;  -- Create  new paren t for orde r set ORDI ALOG
  1049            ;  Returns O RPIFN = if n of new p arent orde r for set
  1050            ;
  1051            Q :'$G(ORVP)   Q:'$G(DL G)  N OR0, PKG,NOW,CA TG,STS,ORL OC,TRSPEC, X
  1052            S  OR0=$G(^O RD(101.41, DLG,0)) Q: OR0=""  S  ORPIFN=$$N EXTIFN Q:' ORPIFN
  1053            S  PKG=$O(^D IC(9.4,"C" ,"OR",0)), CATG=$S($$ INPT^ORCD: "I",1:"O") ,STS=$S($G
  1054   (OREVENT): 10,1:11),N OW=$S($G(O RSLOG):ORS LOG,1:+$E( $$NOW^XLFD T,1,12))
  1055            I  $G(OREVEN T) S ORLOC ="",TRSPEC =""
  1056            S  ^OR(100,O RPIFN,0)=O RPIFN_U_OR VP_U_U_$G( ORNP)_U_DL G_";ORD(10 1.41,^"_DU
  1057   Z_U_NOW_U_ U_U_ORLOC_ U_U_CATG_U _TRSPEC_U_ PKG_"^^^"_ $G(OREVENT ),^(3)=NOW _"^90^"_ST S_U_$S($G( ORIT):ORIT _"ORD(101. 41,",1:"") _"^^^1^^^^ 0^^"_+$P(O R0,U,6)
  1058            S  ^OR(100,O RPIFN,8,0) ="^100.008 DA^1^1",^( 1,0)=NOW_" ^NW^"_$G(O RNP)_"^^^^
  1059   ^^^^^^"_DU Z_"^^"_STS ,^OR(100,O RPIFN,8,"C ","NW",1)= "",^OR(100 ,"AF",NOW, ORPIFN,1)= ""
  1060  
  1061   Modified L ogic (Chan ges are in  bold)
  1062   EN1, ACTIO N & SET Ta gs affecte d:
  1063  
  1064   EN1      S  ^OR(100,O RIFN,0)=OR IFN_U_ORVP _U_U_$G(OR NP)_U_+ORD IALOG_";OR D(101.41,^
  1065   "_USR_U_LO G_U_U_U_LO C_U_DG_U_C ATG_U_TRSP EC_U_PKG_U _U_SIGNREQ D_U_$G(ORE VENT)_U_$G
  1066   (ORAPPT)
  1067            S  ^OR(100,O RIFN,3)=LO G_"^90^"_S TS_U_$S($G (ORIT):ORI T_";ORD(10 1.41,",1:"
  1068   ")_U_$G(OR DIALOG("PR EV"))_"^^1 ^^^^"_TYPE
  1069            S  ^OR(100,O RIFN,8,0)= "^100.008D A^1^1",^OR (100,ORIFN ,8,1,0)=LO G_"^NW^"_$
  1070   G(ORNP)_U_ $S(SIGNREQ D:2,1:3)_" ^^^^^^^^"_ NATR_U_USR _"^1^"_STS ,^OR(100,O RIFN,8,"C" ,"NW",1)=" "
  1071            S  ^OR(100," AF",LOG,OR IFN,1)=""
  1072            ;  RBD OR*3. 0*453 Add  setting of  EPRACDT i ndex expli citly
  1073            I  $G(ORNP)] "" S ^OR(1 00,"EPRACD T",ORNP,LO G,ORIFN,1) =""
  1074  
  1075   ACTION(COD E,DA,PROV, REASON,WHE N,WHO) ; - - save new  action
  1076            N  NEXT,TOTA L,HDR,LAST ,X,PAT,DGR P,SIG,NATR ,TXT S DA= +DA
  1077            Q :'$D(^OR(1 00,DA,0))  0 Q:$G(COD E)'?2U 0
  1078            S :'$G(WHEN)  WHEN=+$E( $$NOW^XLFD T,1,12) S: '$G(WHO) W HO=DUZ
  1079            S  NATR=+$O( ^ORD(100.0 2,"C","E", 0)) ;assum e Elec Ent ered until  changed
  1080            S  PAT=$P(^O R(100,DA,0 ),U,2),DGR P=$P(^(0), U,11),SIG= $P(^(0),U, 16),X=+$P( $G(^(3)),U ,7),HDR=$G (^(8,0))
  1081            S :X'>0 X=1  S TXT=$P($ G(^OR(100, DA,8,X,0)) ,U,14) ;cu rrent actn 's txt ptr
  1082            S :HDR="" HD R="^100.00 8DA^^" S T OTAL=+$P(H DR,U,4)
  1083            S  LAST=$O(^ OR(100,DA, 8,"C",CODE ,"?"),-1)  I LAST D
  1084            .  S X=$G(^O R(100,DA,8 ,LAST,0))  Q:$P(X,U,1 5)'=11  Q: $P(X,U,4)' =2
  1085            .  S NEXT=LA ST I PAT,$ P(X,U) D   ; kill old  xref entr ies
  1086            .  . K:DGRP  ^OR(100,"A CT",PAT,(9 999999-$P( X,U)),DGRP ,DA,NEXT)
  1087            .  . K ^OR(1 00,"AC",PA T,(9999999 -$P(X,U)), DA,NEXT),^ OR(100,"AS ",PAT,(999
  1088   9999-$P(X, U)),DA,NEX T),^OR(100 ,"AF",$P(X ,U),DA,NEX T)
  1089            .  . I $P(X, U,3) K ^OR (100,"EPRA CDT",$P(X, U,3),$P(X, U),DA,NEXT )   ; RBD 
  1090   OR*3.0*453  Handle Ki ll of EPRA CDT index  as AF inde x is done
  1091            S :'$G(NEXT)  NEXT=$O(^ OR(100,DA, 8,"?"),-1) +1,TOTAL=T OTAL+1
  1092            S  ^OR(100,D A,8,NEXT,0 )=WHEN_U_C ODE_U_$G(P ROV)_U_$S( SIG:2,1:3) _"^^^^^^^^
  1093   "_NATR_U_W HO_U_TXT_" ^11",^OR(1 00,DA,8,"C ",CODE,NEX T)=""
  1094            S  ^OR(100," AF",WHEN,D A,NEXT)=""  I $G(PROV )]"" S ^OR (100,"EPRA CDT",PROV, WHEN,DA,NE XT)=""   ;  RBD OR*3. 0*453 Hand le Set of  EPRACDT in dex
  1095  
  1096   SET(DLG) ;  -- Create  new paren t for orde r set ORDI ALOG
  1097            ;  Returns O RPIFN = if n of new p arent orde r for set
  1098            ;
  1099            Q :'$G(ORVP)   Q:'$G(DL G)  N OR0, PKG,NOW,CA TG,STS,ORL OC,TRSPEC, X
  1100            S  OR0=$G(^O RD(101.41, DLG,0)) Q: OR0=""  S  ORPIFN=$$N EXTIFN Q:' ORPIFN
  1101            S  PKG=$O(^D IC(9.4,"C" ,"OR",0)), CATG=$S($$ INPT^ORCD: "I",1:"O") ,STS=$S($G
  1102   (OREVENT): 10,1:11),N OW=$S($G(O RSLOG):ORS LOG,1:+$E( $$NOW^XLFD T,1,12))
  1103            I  $G(OREVEN T) S ORLOC ="",TRSPEC =""
  1104            S  ^OR(100,O RPIFN,0)=O RPIFN_U_OR VP_U_U_$G( ORNP)_U_DL G_";ORD(10 1.41,^"_DU
  1105   Z_U_NOW_U_ U_U_ORLOC_ U_U_CATG_U _TRSPEC_U_ PKG_"^^^"_ $G(OREVENT ),^(3)=NOW _"^90^"_ST
  1106   S_U_$S($G( ORIT):ORIT _"ORD(101. 41,",1:"") _"^^^1^^^^ 0^^"_+$P(O R0,U,6)
  1107            S  ^OR(100,O RPIFN,8,0) ="^100.008 DA^1^1",^( 1,0)=NOW_" ^NW^"_$G(O RNP)_"^^^^
  1108   ^^^^^^"_DU Z_"^^"_STS ,^OR(100,O RPIFN,8,"C ","NW",1)= "",^OR(100 ,"AF",NOW, ORPIFN,1)= ""
  1109            I  $G(ORNP)] "" S ^OR(1 00,"EPRACD T",ORNP,NO W,ORPIFN,1 )=""   ; R BD OR*3.0*
  1110   453 Set ne w EPRACDT  index expl icitly as  AF index i s done
  1111  
  1112   ORELR5 Rou tine
  1113   Routines
  1114   Activities
  1115   Routine Na me
  1116   ORELR5
  1117   Enhancemen t Category
  1118    New
  1119    Modify
  1120    Delete
  1121    No Change
  1122   RTM
  1123  
  1124   Related Op tions
  1125   Check Lab  orders fro m file 69  to 100 [OR E LAB ORDE RS CHECK 6 9=>100]
  1126  
  1127   Related Ro utines
  1128   Routines “ Called By”
  1129   Routines “ Called”   
  1130  
  1131   ORELR
  1132   DICN, ORCS AVE2, ORDD 100, ORU,  ORUTL1, OR X, XLFDT
  1133  
  1134   Routines
  1135   Activities
  1136   Data Dicti onary (DD)  Reference s
  1137   ^DD(100, ^ LAB(60, ^L R, ^LRO(69 , ^OR(100,  
  1138   Related Pr otocols
  1139   N/A
  1140   Related In tegration  Control Re gistration s (ICRs)
  1141   N/A
  1142   Data Passi ng
  1143    Input
  1144    Output Re ference
  1145    Both
  1146    Global Re ference
  1147    Local
  1148   Input Attr ibute Name  and Defin ition
  1149   Name: LRDF N
  1150   Definition : IEN into  PATIENT f ile (#2)
  1151   Name: ORAF IX
  1152   Definition : Flag to  Fix Databa se or not
  1153   Output Att ribute Nam e and Defi nition
  1154   Name:
  1155   Definition :
  1156  
  1157   Current Lo gic
  1158   LOOP(LRDFN ,ORAFIX) ; Loop on pa tient
  1159            I  '$D(^LR(L RDFN,0)) D  WRT(,,,"N o entry in  ^LR("_LRD FN,ORAFIX)  S DCNT=DC
  1160   NT+1,TOTCN T=TOTCNT+1  K:ORAFIX  ^LRO(69,"D ",LRDFN) Q
  1161            Q :$P(^LR(LR DFN,0),"^" ,2)'=2  ;N ot in pati ent file.
  1162            S  DFN=$P(^L R(LRDFN,0) ,"^",3)
  1163            Q :'$D(^LRO( 69,"D",$G( LRDFN)))
  1164            N  LRODT,LRS N,LRTI,LRT ST,LRENT,X ,X0,X3,ORX 1,ORX2,ORI FN,X8O
  1165            S  LRODT=0 F   S LRODT= $O(^LRO(69 ,"D",LRDFN ,LRODT)) Q :'LRODT  S  LRSN=0 F 
  1166    S LRSN=$O (^LRO(69," D",LRDFN,L RODT,LRSN) ) Q:'LRSN   D
  1167            .  I '$D(^LR O(69,LRODT ,1,LRSN,0) ) D WRT(LR ODT,LRSN,, "D X-ref i nvalid",OR AFIX) S DC NT=DCNT+1, TOTCNT=TOT CNT+1 K:OR AFIX ^LRO( 69,"D",LRD FN,LRODT,L RSN) Q
  1168            .  S X=^LRO( 69,LRODT,1 ,LRSN,0),L RENT=$P(X, "^",5)
  1169            .  S LRTI=0  F  S LRTI= $O(^LRO(69 ,LRODT,1,L RSN,2,LRTI )) Q:LRTI< 1  S X0=^( LRTI,0) D
  1170            . . S LRTST= +X0,ORIFN= $P(X0,"^", 7)
  1171            . . I ORIFN  D
  1172            . .. I '$D(^ OR(100,ORI FN)) D WRT (LRODT,LRS N,LRTI,"Br oken point er to 100:
  1173   "_ORIFN,OR AFIX) S F1 00CNT=F100 CNT+1,TOTC NT=TOTCNT+ 1 S:ORAFIX  $P(^LRO(6 9,LRODT,1, LRSN,2,LRT I,0),"^",7 )="P" Q  ; P=purged
  1174            . .. S X=^OR (100,ORIFN ,0),X3=$G( ^(3))
  1175            . .. I DFN'= +$P(X,"^", 2) D WRT(L RODT,LRSN, LRTI,"Pati ent mismat ch:"_ORIFN
  1176   _"<"_$P(X3 ,"^",3)_"> ") S PTCNT =PTCNT+1,T OTCNT=TOTC NT+1 Q
  1177            . .. D STATU S(LRODT,LR SN,LRTI,X0 ,ORAFIX)
  1178            . .. I LRENT ,$P(X,"^", 7)>$S($P($ P(X,"^",8) ,".",2):$P (X,"^",8), 1:$P(X,"^" ,8)_".2359 ") D
  1179            . ... S ORX1 =$$FMADD^X LFDT($P(X, "^",7),,,3 0),ORX2=$$ FMADD^XLFD T($P(X,"^"
  1180   ,7),,,-30)
  1181            . ... I LREN T<ORX2!(LR ENT>ORX1)  S ENTCNT=E NTCNT+1,TO TCNT=TOTCN T+1 I ORAF IX D
  1182            . .... S $P( ^OR(100,OR IFN,0),"^" ,7)=LRENT
  1183            . .... I $P( X,"^",7)=+ $G(^OR(100 ,ORIFN,8,1 ,0)) S X8O =$G(^(0))  D
  1184            . ..... N DI ,DIC,DIE,D A,DR,D0,DQ ,DISYS
  1185            . ..... I $P (X,"^",11)  K ^OR(100 ,"ACT",$P( X,"^",2),9 999999-+X8 O,$P(X,"^" ,11),ORIFN ,1)
  1186            . ..... K ^O R(100,"AC" ,$P(X,"^", 2),9999999 -+X8O,ORIF N,1),^OR(1 00,"AF",+X
  1187   8O,ORIFN,1 ),^OR(100, "AS",$P(X, "^",2),999 9999-(+X8O ),ORIFN,1)
  1188            . ..... I $P (X8O,"^",1 6)=+X8O K  ^OR(100,"A R",$P(X,"^ ",2),99999 99-(+X8O),
  1189   ORIFN,1) S  ^OR(100," AR",$P(X," ^",2),9999 999-LRENT, ORIFN,1)=" ",$P(^OR(1 00,ORIFN,8
  1190   ,1,0),"^", 16)=LRENT
  1191            . ..... S $P (^OR(100,O RIFN,8,1,0 ),"^")=LRE NT,^OR(100 ,"AF",LREN T,ORIFN,1) =""
  1192            . ..... D S1 ^ORDD100(O RIFN,1,"", LRENT),SET ^ORDD100(O RIFN,1),AC T1^ORDD100
  1193   A(ORIFN,1)
  1194            Q
  1195  
  1196   Modified L ogic (Chan ges are in  bold)
  1197   LOOP(LRDFN ,ORAFIX) ; Loop on pa tient
  1198            I  '$D(^LR(L RDFN,0)) D  WRT(,,,"N o entry in  ^LR("_LRD FN,ORAFIX)  S DCNT=DC NT+1,TOTCN T=TOTCNT+1  K:ORAFIX  ^LRO(69,"D ",LRDFN) Q
  1199            Q :$P(^LR(LR DFN,0),"^" ,2)'=2  ;N ot in pati ent file.
  1200            S  DFN=$P(^L R(LRDFN,0) ,"^",3)
  1201            Q :'$D(^LRO( 69,"D",$G( LRDFN)))
  1202            N  LRODT,LRS N,LRTI,LRT ST,LRENT,X ,X0,X3,ORX 1,ORX2,ORI FN,X8O
  1203            S  LRODT=0 F   S LRODT= $O(^LRO(69 ,"D",LRDFN ,LRODT)) Q :'LRODT  S  LRSN=0 F 
  1204    S LRSN=$O (^LRO(69," D",LRDFN,L RODT,LRSN) ) Q:'LRSN   D
  1205            .  I '$D(^LR O(69,LRODT ,1,LRSN,0) ) D WRT(LR ODT,LRSN,, "D X-ref i nvalid",OR AFIX) S DC NT=DCNT+1, TOTCNT=TOT CNT+1 K:OR AFIX ^LRO( 69,"D",LRD FN,LRODT,L RSN) Q
  1206            .  S X=^LRO( 69,LRODT,1 ,LRSN,0),L RENT=$P(X, "^",5)
  1207            .  S LRTI=0  F  S LRTI= $O(^LRO(69 ,LRODT,1,L RSN,2,LRTI )) Q:LRTI< 1  S X0=^( LRTI,0) D
  1208            . . S LRTST= +X0,ORIFN= $P(X0,"^", 7)
  1209            . . I ORIFN  D
  1210            . .. I '$D(^ OR(100,ORI FN)) D WRT (LRODT,LRS N,LRTI,"Br oken point er to 100: "_ORIFN,OR AFIX) S F1 00CNT=F100 CNT+1,TOTC NT=TOTCNT+ 1 S:ORAFIX  $P(^LRO(6 9,LRODT,1, LRSN,2,LRT I,0),"^",7 )="P" Q  ; P=purged
  1211            . .. S X=^OR (100,ORIFN ,0),X3=$G( ^(3))
  1212            . .. I DFN'= +$P(X,"^", 2) D WRT(L RODT,LRSN, LRTI,"Pati ent mismat ch:"_ORIFN _"<"_$P(X3 ,"^",3)_"> ") S PTCNT =PTCNT+1,T OTCNT=TOTC NT+1 Q
  1213            . .. D STATU S(LRODT,LR SN,LRTI,X0 ,ORAFIX)
  1214            . .. I LRENT ,$P(X,"^", 7)>$S($P($ P(X,"^",8) ,".",2):$P (X,"^",8), 1:$P(X,"^" ,8)_".2359 ") D
  1215            . ... S ORX1 =$$FMADD^X LFDT($P(X, "^",7),,,3 0),ORX2=$$ FMADD^XLFD T($P(X,"^" ,7),,,-30)
  1216            . ... I LREN T<ORX2!(LR ENT>ORX1)  S ENTCNT=E NTCNT+1,TO TCNT=TOTCN T+1 I ORAF IX D
  1217            . .... S $P( ^OR(100,OR IFN,0),"^" ,7)=LRENT
  1218            . .... I $P( X,"^",7)=+ $G(^OR(100 ,ORIFN,8,1 ,0)) S X8O =$G(^(0))  D
  1219            . ..... N DI ,DIC,DIE,D A,DR,D0,DQ ,DISYS
  1220            . ..... I $P (X,"^",11)  K ^OR(100 ,"ACT",$P( X,"^",2),9 999999-+X8 O,$P(X,"^" ,11),ORIFN ,1)
  1221            . ..... K ^O R(100,"AC" ,$P(X,"^", 2),9999999 -+X8O,ORIF N,1),^OR(1 00,"AF",+X
  1222   8O,ORIFN,1 ),^OR(100, "AS",$P(X, "^",2),999 9999-(+X8O ),ORIFN,1)
  1223            . ..... I $P (X8O,"^",3 ) K ^OR(10 0,"EPRACDT ",$P(X8O," ^",3),+X8O ,ORIFN,1)    ; RBD OR *3.0*453 C lean up ne w EPRACDT  index also
  1224            . ..... I $P (X8O,"^",1 6)=+X8O K  ^OR(100,"A R",$P(X,"^ ",2),99999 99-(+X8O), ORIFN,1) S  ^OR(100," AR",$P(X," ^",2),9999 999-LRENT, ORIFN,1)=" ",$P(^OR(1 00,ORIFN,8 ,1,0),"^", 16)=LRENT
  1225            . ..... S $P (^OR(100,O RIFN,8,1,0 ),"^")=LRE NT,^OR(100 ,"AF",LREN T,ORIFN,1) =""
  1226            . ..... S ^O R(100,"EPR ACDT",$P(X 8O,"^",3), LRENT,ORIF N,1)=""    ; RBD OR*3 .0*453 Res et EPRACDT  index als o
  1227            . ..... D S1 ^ORDD100(O RIFN,1,"", LRENT),SET ^ORDD100(O RIFN,1),AC T1^ORDD100 A(ORIFN,1)
  1228            Q
  1229  
  1230   ORQ2 Routi ne
  1231  
  1232   Routines
  1233   Activities
  1234   Routine Na me
  1235   ORQ2
  1236   Enhancemen t Category
  1237    New
  1238    Modify
  1239    Delete
  1240    No Change
  1241   RTM
  1242  
  1243   Related Op tions
  1244   N/A
  1245  
  1246   Related Ro utines
  1247   Routines “ Called By”
  1248   Routines “ Called”   
  1249  
  1250   ORCXPND2,  ORRCOR, OR WOR, SAVEW OR
  1251   DIQ, DIWP,  ICDEX, OR CD, ORCHEC K, ORHLESC , ORQ12, O RQ20, ORQ2 1, ORX8, V ADPT, XLFS TR, XPAR
  1252  
  1253   Routines
  1254   Activities
  1255   Data Dicti onary (DD)  Reference s
  1256   ^DIC(45.7,   ^GMR(123 , ^OR(100,  ^ORD(100. 01, ^ORD(1 01.41, ^SC
  1257   Related Pr otocols
  1258   N/A
  1259   Related In tegration  Control Re gistration s (ICRs)
  1260   4203
  1261   Data Passi ng
  1262    Input
  1263    Output Re ference
  1264    Both
  1265    Global Re ference
  1266    Local
  1267   Input Attr ibute Name  and Defin ition
  1268   Name: ORIF N
  1269   Definition : IEN into  ORDER fil e (#100)
  1270   Output Att ribute Nam e and Defi nition
  1271   Name: ORY
  1272   Definition : Array of  Order Det ail inform ation
  1273  
  1274   Current Lo gic
  1275   DETAIL(ORY ,ORIFN) ;  -- Returns  details o f order OR IFN in ORY (#)
  1276            N  X,X2,I,CN T,ORDIALOG ,OR0,OR3,O R6,SEQ,ITE M,PRMT,MUL T,FIRST,TI TLE,INST,D
  1277   IWL,DIWR,D IWF,ACTION ,VAIN,ORIG VIEW,ORNMS P,ORYT
  1278            S  CNT=0,ORI FN=+ORIFN, OR0=$G(^OR (100,ORIFN ,0)),OR3=$ G(^(3)),OR 6=$G(^(6))
  1279            S  ORNMSP=$$ NMSP^ORCD( $P(OR0,U,1 4))
  1280            K  @ORY,ORYT  S ORIGVIE W=1 D TEXT ^ORQ12(.OR YT,+ORIFN_ ";"_+$P(OR 3,U,7),80)
  1281    ;CurrTx
  1282            M  @ORY=ORYT  ;Move tex t to globa l
  1283            S  I=0 F CNT =1:1 S I=$ O(ORYT(I))  Q:I'>0  D :$D(IORVON ) SETVIDEO (I,1,$L(OR
  1284   YT(I)),IOR VON,IORVOF F)
  1285            S  CNT=CNT+1 ,@ORY@(CNT )="   " ;b lank
  1286   D1       I  $O(^OR(10 0,+ORIFN,2 ,0)) D
  1287            .  S CNT=CNT +1,@ORY@(C NT)="Sub O rders:"
  1288            .  D:$D(IOUO N) SETVIDE O(CNT,1,11 ,IOUON,IOU OFF)
  1289            .  N IFN S I FN=0
  1290            .  F  S IFN= +$O(^OR(10 0,+ORIFN,2 ,IFN)) Q:I FN<1  I $D (^OR(100,I FN,0)) D S UB(IFN)
  1291            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1292            I  $P(OR3,U, 9),$D(^OR( 100,+$P(OR 3,U,9),0))  D
  1293            .  S CNT=CNT +1,@ORY@(C NT)="Paren t Order:"
  1294            .  D:$D(IOUO N) SETVIDE O(CNT,1,12 ,IOUON,IOU OFF)
  1295            .  D SUB(+$P (OR3,U,9))
  1296            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1297            I  $P(OR3,U, 11)=1,$P(O R3,U,5) D   ;Changed  - show pre vious orde r
  1298            .  S CNT=CNT +1,@ORY@(C NT)="Previ ous Order: "
  1299            .  D:$D(IOUO N) SETVIDE O(CNT,1,15 ,IOUON,IOU OFF) ;prev  order ori ginal text
  1300            .  N ORZ,I,O RIGVIEW S  ORIGVIEW=2  D TEXT^OR Q12(.ORZ,+ $P(OR3,U,5 ),55)
  1301            .  S CNT=CNT +1,@ORY@(C NT)="      Order Text :        " _$G(ORZ(1) )
  1302            .  S I=1 F   S I=$O(ORZ (I)) Q:I'> 0  S CNT=C NT+1,@ORY@ (CNT)=$$RE PEAT^XLFST
  1303   R(" ",24)_ $G(ORZ(I))
  1304   D2       S  CNT=CNT+1 ,@ORY@(CNT )="Activit y:"
  1305            D :$D(IOUON)  SETVIDEO( CNT,1,9,IO UON,IOUOFF )
  1306            S  DIWL=1,DI WR=64,DIWF ="C64",ORI =0 K ^UTIL ITY($J,"W" )
  1307            F   S ORI=$O (^OR(100,O RIFN,8,ORI )) Q:ORI'> 0  S ACTIO N=$G(^(ORI ,0)) D ACT
  1308   ^ORQ20
  1309  
  1310   Modified L ogic (Chan ges are in  bold)
  1311   DETAIL(ORY ,ORIFN) ;  -- Returns  details o f order OR IFN in ORY (#)
  1312            N  X,X2,I,CN T,ORDIALOG ,OR0,OR3,O R6,SEQ,ITE M,PRMT,MUL T,FIRST,TI TLE,INST,D
  1313   IWL,DIWR,D IWF,ACTION ,VAIN,ORIG VIEW,ORNMS P,ORYT
  1314            N  ORTRANS
  1315            S  CNT=0,ORI FN=+ORIFN, OR0=$G(^OR (100,ORIFN ,0)),OR3=$ G(^(3)),OR 6=$G(^(6))
  1316            S  ORNMSP=$$ NMSP^ORCD( $P(OR0,U,1 4))
  1317            K  @ORY,ORYT  S ORIGVIE W=1 D TEXT ^ORQ12(.OR YT,+ORIFN_ ";"_+$P(OR 3,U,7),80)  ;CurrTx
  1318            M  @ORY=ORYT  ;Move tex t to globa l
  1319            S  I=0 F CNT =1:1 S I=$ O(ORYT(I))  Q:I'>0  D :$D(IORVON ) SETVIDEO (I,1,$L(OR YT(I)),IOR VON,IORVOF F)
  1320            S  CNT=CNT+1 ,@ORY@(CNT )="   " ;b lank
  1321   D1       I  $O(^OR(10 0,+ORIFN,2 ,0)) D
  1322            .  S CNT=CNT +1,@ORY@(C NT)="Sub O rders:"
  1323            .  D:$D(IOUO N) SETVIDE O(CNT,1,11 ,IOUON,IOU OFF)
  1324            .  N IFN S I FN=0
  1325            .  F  S IFN= +$O(^OR(10 0,+ORIFN,2 ,IFN)) Q:I FN<1  I $D (^OR(100,I FN,0)) D S UB(IFN)
  1326            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1327            I  $P(OR3,U, 9),$D(^OR( 100,+$P(OR 3,U,9),0))  D
  1328            .  S CNT=CNT +1,@ORY@(C NT)="Paren t Order:"
  1329            .  D:$D(IOUO N) SETVIDE O(CNT,1,12 ,IOUON,IOU OFF)
  1330            .  D SUB(+$P (OR3,U,9))
  1331            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1332            I  $P(OR3,U, 11)=1,$P(O R3,U,5) D   ;Changed  - show pre vious orde r
  1333            .  S CNT=CNT +1,@ORY@(C NT)="Previ ous Order: "
  1334            .  D:$D(IOUO N) SETVIDE O(CNT,1,15 ,IOUON,IOU OFF) ;prev  order ori ginal text
  1335            .  N ORZ,I,O RIGVIEW S  ORIGVIEW=2  D TEXT^OR Q12(.ORZ,+ $P(OR3,U,5 ),55)
  1336            .  S CNT=CNT +1,@ORY@(C NT)="      Order Text :        " _$G(ORZ(1) )
  1337            .  S I=1 F   S I=$O(ORZ (I)) Q:I'> 0  S CNT=C NT+1,@ORY@ (CNT)=$$RE PEAT^XLFST R(" ",24)_ $G(ORZ(I))
  1338   D2       S  CNT=CNT+1 ,@ORY@(CNT )="Activit y:"
  1339            D :$D(IOUON)  SETVIDEO( CNT,1,9,IO UON,IOUOFF )
  1340            S  DIWL=1,DI WR=64,DIWF ="C64",ORI =0 K ^UTIL ITY($J,"W" )
  1341            F   S ORI=$O (^OR(100,O RIFN,8,ORI )) Q:ORI'> 0  S ACTIO N=$G(^(ORI ,0)) D ACT ^ORQ20
  1342            ;  RBD OR*3. 0*453 Add  ORDER TRAN SFERS info rmation
  1343            S  ORI=0 F   S ORI=$O(^ OR(100,ORI FN,11,ORI) ) Q:ORI'>0   D
  1344            .  I ORI=1 D
  1345            . . S CNT=CN T+1,@ORY@( CNT)="   " ,CNT=CNT+1 ,@ORY@(CNT )="Reassig nments (Tr ansfers):"
  1346            .  S ORTRANS =$G(^OR(10 0,ORIFN,11 ,ORI,0))
  1347            .  S CNT=CNT +1,@ORY@(C NT)="Trans ferred fro m "_$$USER ^ORQ20($P( ORTRANS,U, 2))_" to " _$$USER^OR Q20($P(ORT RANS,U,3))
  1348            .  S CNT=CNT +1,@ORY@(C NT)="  by  "_$$USER^O RQ20($P(OR TRANS,U,4) )_" Effect ive From " _$$DATE^OR Q20($P(ORT RANS,U))
  1349            I  $D(^OR(10 0,ORIFN,11 )) S CNT=C NT+1,@ORY@ (CNT)="    "
  1350  
  1351   ORQ3 Routi ne
  1352   Routines
  1353   Activities
  1354   Routine Na me
  1355   ORQ3
  1356   Enhancemen t Category
  1357    New
  1358    Modify
  1359    Delete
  1360    No Change
  1361   RTM
  1362  
  1363   Related Op tions
  1364   N/A
  1365  
  1366   Related Ro utines
  1367   Routines “ Called By”
  1368   Routines “ Called”   
  1369  
  1370   Called by  CPRS GUI v ia RPC cal ls ORQ3 EN , ORQ3 XFE R, ORQ3 AU THUSR & OR Q3 CHKPATC H.
  1371   DICN, ORQO R2, VADPT,  XLFDT
  1372  
  1373   Routines
  1374   Activities
  1375   Data Dicti onary (DD)  Reference s
  1376   ^OR(100, ^ VA(200
  1377   Related Pr otocols
  1378   N/A
  1379   Related In tegration  Control Re gistration s (ICRs)
  1380   N/A
  1381   Data Passi ng
  1382    Input
  1383    Output Re ference
  1384    Both
  1385    Global Re ference
  1386    Local
  1387   Input Attr ibute Name  and Defin ition
  1388   Name: ORPR IEN
  1389   Definition : IEN into  NEW PERSO N file (#2 00)
  1390   Name: ORDT 1
  1391   Definition : Starting  Date to S earch From
  1392   Name: ORDT 2
  1393   Definition : Ending D ate to Sea rch To
  1394   Name: LST
  1395   Definition :  List of  Order IEN s, Transfe rred From  Provider,  Transferre d To Provi ders, User  Requestin g Transfer , and Date /Times of  Transfer
  1396   Name: ORPA TCH
  1397   Definition : String c ontaining  “OR*3.0*45 3” to make  sure this  patch is  installed.
  1398   Output Att ribute Nam e and Defi nition
  1399   Name: ORY
  1400   Definition : Return A rray of Pa tients & O rders info rmation; a lso used t o return a  “1” or “0 ” to denot e if a use r can acce ss Provide r Role Cha nge from w ithin CPRS  or not.   Also used  to return  if OR*3.0* 453 has be en install ed or not  (may be us ed in futu re to chec k if other  Provider  Role Chang e patches  are instal led).
  1401   Name:  RES ULTS
  1402   Definition :  Return  Array of O rders that  have Succ essfully a nd Unsucce ssfully ha d Transfer /Re-Assign ment attem pted; if U nsuccessfu l then Err or Message  will also  be return ed.
  1403  
  1404   Current Lo gic
  1405   N/A
  1406  
  1407   Modified L ogic (Chan ges are in  bold)
  1408   ORQ3     ; SLC/RBD -  Provider R ole Change  APIs ;06/ 09/17  14: 12
  1409            ; ;3.0;ORDER  ENTRY/RES ULTS REPOR TING;**453 **;Dec 17,  1997
  1410            ;
  1411            Q
  1412            ;
  1413   EN(ORY,ORP RIEN,ORDT1 ,ORDT2) ;  Get Qualif ying Order s for Prov ider
  1414            ;
  1415            ;  This RPC  allows ret rieval of  Patients a nd Orders  for which  the
  1416            ;  Provider  is the Ord ering Prov ider and t he Orders  are Signed
  1417            ;
  1418            ;  Input:
  1419            ;    ORY is  the name o f the retu rn array
  1420            ;    ORPRIEN  identifie s the IEN  of the Pro vider to r etrieve Or ders for
  1421            ;    ORDT1 i dentifies  the start  date to st art lookin g from
  1422            ;    ORDT2 i dentifies  the end da te to stop  looking o nce reache d
  1423            ;  Output:
  1424            ;    Global  ^TMP("ORPA TRTN",$J,n ) where n  represents  each reco rd found
  1425            ;                                      starti ng with re cord "1"
  1426            ;      Conta ins data f or Patient  Name ^ Pa tient IEN  ^ Order IE N ^
  1427            ;                             Orde r Status ^  Order Dat e
  1428            ;
  1429            N  CNT,DFN,O R0,ORIEN,O ROBJ,ORPRX FRD,ORPTNM ,ORSIGNED, ORTMPDT,OR XFERNM,VAD M
  1430            S :'$D(U) U= "^" K ^TMP ("ORPTINFO ",$J),^TMP ("ORPATRTN ",$J)
  1431            S  ORY=$NA(^ TMP("ORPAT RTN",$J))
  1432            ;  Loop thro ugh Provid ers that a re Orderin g Provider s for Orde rs that ha ve been Si gned
  1433            S  ORTMPDT=O RDT1,ORDT2 =ORDT2_".2 359"
  1434            F   S ORDT1= $O(^OR(100 ,"EPRACDT" ,ORPRIEN,O RDT1)) Q:O RDT1>ORDT2   Q:ORDT1= ""  D
  1435            .  S ORIEN=" " F  S ORI EN=$O(^OR( 100,"EPRAC DT",ORPRIE N,ORDT1,OR IEN)) Q:OR IEN=""  D
  1436            . . S OR0=$G (^OR(100,O RIEN,0)) Q :ORIEN'[""   Q:$$ORDE RER^ORQOR2 (ORIEN)'=O RPRIEN   ;  skip if n ot Ord. Pr v.
  1437            . . S ORSIGN ED=($P($G( ^OR(100,+O RIEN,8,1,0 )),U,4)'=2 ) Q:'ORSIG NED     ;  skip if Or der not Si gned
  1438            . . ; if Old  Provider  already Tr ansferred,  skip
  1439            . . S ORPRXF RD=0,ORXFE RNM=0
  1440            . . F  S ORX FERNM=$O(^ OR(100,ORI EN,11,ORXF ERNM)) Q:O RXFERNM=""   Q:ORXFER NM'?1N.N   D
  1441            . .. I $P($G (^OR(100,O RIEN,11,OR XFERNM,0)) ,U,2)=ORPR IEN D
  1442            . ... S ORPR XFRD=1
  1443            . . Q:ORPRXF RD=1  S OR OBJ=$P(OR0 ,U,2) Q:OR OBJ'["DPT( "
  1444            . . S DFN=+O ROBJ D OER R^VADPT S  ORPTNM=$G( VADM(1)) Q :ORPTNM=""
  1445            . . S ^TMP(" ORPTINFO", $J,ORPTNM, DFN,ORIEN) =""
  1446            ;  Now order  through T ransferred  To Provid er index f or situati on where h e/she has
  1447            ;  to Transf er Order t o a third  Provider ( or fourth,  etc.) ...  only allo w last ent ry
  1448            ;  from ORDE R TRANSFER S multiple  to be use d though.
  1449            S  ORDT1=ORT MPDT
  1450            F   S ORDT1= $O(^OR(100 ,"EPRTRDT" ,ORPRIEN,O RDT1)) Q:O RDT1>ORDT2   Q:ORDT1= ""  D
  1451            .  S ORIEN=" " F  S ORI EN=$O(^OR( 100,"EPRTR DT",ORPRIE N,ORDT1,OR IEN)) Q:OR IEN=""  D
  1452            . . S ORXFER NM=$O(^OR( 100,ORIEN, 11,"B"),-1 ) Q:$P($G( ^OR(100,OR IEN,11,ORX FERNM,0)), U,3)’=
  1453   ORPRIEN
  1454            . . S OR0=$G (^OR(100,O RIEN,0)) Q :ORIEN'[""
  1455            . . S OROBJ= $P(OR0,U,2 ) Q:OROBJ' ["DPT("
  1456            . . S DFN=+O ROBJ D OER R^VADPT S  ORPTNM=$G( VADM(1)) Q :ORPTNM=""
  1457            . . S ^TMP(" ORPTINFO", $J,ORPTNM, DFN,ORIEN) =""
  1458            ;  Put in Pa tient Name , Patient  IEN, & Ord er IEN ord er to retu rn to GUI
  1459            S  CNT=0,ORP TNM="" F   S ORPTNM=$ O(^TMP("OR PTINFO",$J ,ORPTNM))  Q:ORPTNM=" "  D
  1460            .  S DFN=""  F  S DFN=$ O(^TMP("OR PTINFO",$J ,ORPTNM,DF N)) Q:DFN= ""  D
  1461            . . S ORIEN= "" F  S OR IEN=$O(^TM P("ORPTINF O",$J,ORPT NM,DFN,ORI EN)) Q:ORI EN=""  D
  1462            . .. S CNT=C NT+1
  1463            . .. S ^TMP( "ORPATRTN" ,$J,CNT)=O RPTNM_U_DF N_U_ORIEN_ U_$P($$STA TUS^ORQOR2
  1464   (ORIEN),U, 2)_U_$$FMT E^XLFDT($P ($G(^OR(10 0,ORIEN,0) ),U,7))
  1465            K  ^TMP("ORP TINFO",$J)
  1466            Q
  1467            ;
  1468   XFER(RESUL TS,LST) ;  Transfer O rders to N ew Provide rs
  1469            ;
  1470            ;  This RPC  allows the  Transferr ing from o ne Provide r to anoth er
  1471            ;  which wil l create a n entry in to each or der in a L ist into
  1472            ;  the ORDER  TRANSFERS  multiple
  1473            ;
  1474            ;  Input:
  1475            ;    LST(1.. n) where e ach entry  contains:
  1476            ;      ORIEN  identifie s the IEN  of the Ord er to crea te a
  1477            ;             Reassignm ent (Trans fer) for
  1478            ;      ORPRI EN1 identi fies the T ransferrin g From Pro vider
  1479            ;      ORPRI EN2 identi fies the T ransferrin g To Provi der
  1480            ;      ORUSE R identifi es the Use r requesti ng the Tra nsfer
  1481            ;      ORDTT M identifi es the Tra nsfer Date /Time
  1482            ;  Output:
  1483            ;    Global  ^TMP("OROR DRTN",$J,n ) where n  represents  each reco rd
  1484            ;                                      starti ng with re cord "1"
  1485            ;      Conta ins data f or Order I EN ^ Succe ss Flag
  1486            ;                             ^ Er ror Messag e if Unsuc cessful
  1487            ;         Wh ere Succes s Flag = 0  if Unsucc essful or  1 if Succe ssful
  1488            ;
  1489            N  CNT,DA,DI C,DIE,DR,O RDTTM,ORIE N,ORPRIEN1 ,ORPRIEN2, ORUSER,X,Y
  1490            S :'$D(U) U= "^" K ^TMP ("ORORDRTN ",$J)
  1491            S  RESULTS=$ NA(^TMP("O RORDRTN",$ J))
  1492            S  CNT=0 F   S CNT=$O(L ST(CNT)) Q :CNT=""  D
  1493            .  S ORIEN=$ P(LST(CNT) ,U,1),ORPR IEN1=$P(LS T(CNT),U,2 )
  1494            .  S ORPRIEN 2=$P(LST(C NT),U,3),O RUSER=$P(L ST(CNT),U, 4)
  1495            .  S ORDTTM= $P(LST(CNT ),U,5)
  1496            .  I ORIEN'] "" S ^TMP( "ORORDRTN" ,$J,CNT)=O RIEN_U_0_U _"Order IE N Blank" Q
  1497            .  I '$D(^OR (100,ORIEN )) D  Q
  1498            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Invalid O rder IEN"
  1499            .  I ORPRIEN 1']"" D  Q
  1500            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "From Prov ider IEN B lank"
  1501            .  I '$D(^VA (200,ORPRI EN1)) D  Q
  1502            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "From Prov ider IEN " _ORPRIEN1_ " Invalid"
  1503            .  I ORPRIEN 2']"" D  Q
  1504            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "To Provid er IEN Bla nk"
  1505            .  I '$D(^VA (200,ORPRI EN2)) D  Q
  1506            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "To Provid er IEN "_O RPRIEN2_"  Invalid"
  1507            .  I ORUSER' ]"" D  Q
  1508            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Transferr ing User I EN Blank"
  1509            .  I '$D(^VA (200,ORUSE R)) D  Q
  1510            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Transferr ing User I EN "_ORUSE R_" Invali d"
  1511            .  I ORDTTM' ?7N1"."4N  S ^TMP("OR ORDRTN",$J ,CNT)=ORIE N_U_0_U_"I nvalid Tra nsfer Date /Time" Q
  1512            .  I ORDTTM< $$NOW^XLFD T() D  Q
  1513            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Transfer  Date/Time  Cannot be  in the Pas t"
  1514            .  L +^OR(10 0,ORIEN):0  I '$T D   Q
  1515            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Another u ser is edi ting this  Order."
  1516            .  S DIC="^O R(100,"_OR IEN_",11," ,DA(1)=ORI EN,DIC(0)= "L",X=ORDT TM
  1517            .  S DIC("DR ")=".02/// /"_ORPRIEN 1_";.03/// /"_ORPRIEN 2
  1518            .  S DIC("DR ")=DIC("DR ")_";.04// //"_ORUSER  D FILE^DI CN
  1519            .  I +Y<0 S  ^TMP("OROR DRTN",$J,C NT)=ORIEN_ U_0_U_"Sav e Unsucces sful" L -^ OR(100,ORI EN) Q
  1520            .  S ^TMP("O RORDRTN",$ J,CNT)=ORI EN_U_1 L - ^OR(100,OR IEN)
  1521            Q
  1522            ;
  1523   AUTHUSR(OR Y) ; Does  user have  permission  to access  Provider
  1524            ;  Utilities  (Provider  Role Chan ge)
  1525            S  ORY=0
  1526            I  $D(^XUSEC ("OR PU AC CESS",DUZ) ) S ORY=1
  1527            Q
  1528            ;
  1529   CHKPATCH(O RY,ORPATCH ) ; Checks  for KIDS  Patch inst all
  1530            ;  RPC: ORQ3  CHKPATCH
  1531            ;  Input:  O RPATCH - P atch Numbe r (i.e. OR *3.0*453)
  1532            ;  Output: R eturns "1^ Patch Is I nstalled"  on success ;
  1533            ;          o therwise r eturns "0^ Patch Is N ot Install ed"
  1534            N  ORX
  1535            S  ORX=$$PAT CH^XPDUTL( ORPATCH)
  1536            S  ORY=$S(OR X:"1^Patch  Is Instal led",1:"0^ Patch Is N ot Install ed")
  1537            Q
  1538            ;
  1539  
  1540   Remote Pro cedure Cal l (RPC)
  1541   RPCs
  1542   Activities
  1543   Name
  1544    'ORQ3 AUT HUSR' 
  1545   TAG^RTN
  1546   AUTHUSR^OR Q3
  1547   Input Para meters
  1548   None – CPR S will alr eady know  the DUZ of  the user  logged in  to it
  1549   Results Ar ray
  1550    Single Va lue
  1551    Array
  1552    Word Proc essing
  1553  
  1554    Global Ar ray
  1555    Global In stance
  1556  
  1557   Descriptio n
  1558   NSR2013050 4 – Provid er Role Ch ange 
  1559   Returns “1 ” if user  has the ne w SECURITY  KEY calle d OR PU AC CESS, othe rwise “0”
  1560  
  1561   RPCs
  1562   Activities
  1563   Name
  1564    'ORQ3 CHK PATCH' 
  1565   TAG^RTN
  1566   CHKPATCH^O RQ3
  1567   Input Para meters
  1568   ORPATCH –  initially  will hold  value of “ OR*3.0*453 ” to make  sure this  patch is i nstalled b ut could h ave other  future Pro vider Role  Change pa tches as a  parameter .
  1569   Results Ar ray
  1570    Single Va lue
  1571    Array
  1572    Word Proc essing
  1573  
  1574    Global Ar ray
  1575    Global In stance
  1576  
  1577   Descriptio n
  1578   NSR2013050 4 – Provid er Role Ch ange 
  1579   Returns “1 ^Patch Is  Installed”  or “0^Pat ch Is Not  Installed”
  1580  
  1581  
  1582   RPCs
  1583   Activities
  1584   Name
  1585    'ORQ3 EN'  
  1586   TAG^RTN
  1587   EN^ORQ3
  1588   Input Para meters
  1589   ORPRIEN –  IEN into N EW PERSON  file (#200 ), ORDT1 –  Start Dat e to begin  Search fo r, ORDT2 –  End Date  to stop Se arch for
  1590   Results Ar ray
  1591    Single Va lue
  1592    Array
  1593    Word Proc essing
  1594  
  1595    Global Ar ray
  1596    Global In stance
  1597  
  1598   Descriptio n
  1599   NSR2013050 4 – Provid er Role Ch ange 
  1600   Returns re sults in P atient Nam e, Patient  IEN, Orde r IEN sort  order wit h the foll owing 5 fi elds:
  1601   Patient Na me,  IEN i nto PATIEN T file (#2 ), IEN int o ORDER fi le (#100),  Status of  the Order , e.g., AC TIVE, PEND ING,  etc. , Date of  Order
  1602  
  1603   RPCs
  1604   Activities
  1605   Name
  1606    'ORQ3 XFE R' 
  1607   TAG^RTN
  1608   XFER^ORQ3
  1609   Input Para meters
  1610   LST(1..n)  where each  entry con tains:
  1611   ORIEN – IE N of ORDER  file (#10 0), ORPRIE N1 – IEN i nto NEW PE RSON file  (#200) rep resenting  Transferri ng From Pr ovider, OR PRIEN2 – I EN into NE W PERSON f ile (#200)  represent ing Transf erring To  Provider,   ORUSER –  IEN into N EW PERSON  file (#200 ) represen ting User  Requesting  Transfer,  & ORDTTM  representi ng Date/Ti me  of Tra nsfer
  1612   Results Ar ray
  1613    Single Va lue
  1614    Array
  1615    Word Proc essing
  1616  
  1617    Global Ar ray
  1618    Global In stance
  1619  
  1620   Descriptio n
  1621   NSR2013050 4 – Provid er Role Ch ange
  1622   Returns re sults of O RDER TRANS FERS Multi ple subrec ord creati on as IEN  into ORDER  file (#10 0), Succes s Flag “1”  if Succes sful and “ 0” otherwi se, & Erro r Message  if Success  Flag is “ 0”
  1623  
  1624   Network De tailed Des ign 
  1625   One of the  design co nstraints  for Provid er Utiliti es is to u tilize the  existing  network in frastructu re. Theref ore no pro curement i s expected .
  1626   Security a nd Privacy
  1627   Security
  1628   There is a  new OR PU  GUI VistA  menu opti on of type  Broker li sted below  with the  RPC calls  that it ne eds (inclu ding the o nes newly  created, O RQ3 AUTHUS R, ORQ3 EN , & ORQ3 X FER).
  1629  
  1630   NAME: OR P U GUI                            MENU TEXT:  CPRS Prov ider Utili ties
  1631     TYPE: Br oker (Clie nt/Server)            CREATOR: D AVIS,ROBER T B
  1632    DESCRIPTI ON:   This  option is  required  by the Ker nel Broker  to give a ccess to
  1633    the RPCs  used by th e CPRS Pro vider Util ities.  
  1634     TIMESTAM P OF PRIMA RY MENU: 6 4509,48974
  1635   RPC: ORWU  DT
  1636   RPC: ORQOR  DETAIL
  1637   RPC: ORWU  NEWPERS
  1638   RPC: ORQ3  EN
  1639   RPC: ORQ3  XFER
  1640   RPC: ORWU  VERSRV
  1641   RPC: ORWU  USERINFO
  1642   RPC: ORQ3  AUTHUSR
  1643     UPPERCAS E MENU TEX T: CPRS PR OVIDER UTI LITIES
  1644  
  1645   Also, a ne w SECURITY  KEY has b een added  with its d efinition  below.
  1646  
  1647   NAME: OR P U ACCESS
  1648     DESCRIPT IVE NAME:  Provider U tilities A ccess
  1649    DESCRIPTI ON:   This  security  key will b e used to  control us er access  to the
  1650    Provider  Utilities  (Provider  Role Chang e) off the  Tools men u in CPRS.
  1651  
  1652   Instructio ns for add ing the Pr oviderUtil ities.exe  to the Too ls menu wi thin CPRS  are outlin ed in the  OR*3.0*453  patch des cription w ithin FORU M.  This i s also par t of its s ecurity.
  1653   Privacy
  1654   This proje ct will co ntinue to  use the ex isting Vis tA / CPRS  privacy mo del.  
  1655  
  1656   Service Or iented Arc hitecture  / ESS Deta iled Desig
  1657   CPRS is a  legacy GUI  applicati on that pr ovides a G UI front-e nd to the  VistA syst em and is  primarily  used by ph ysicians,  nurses and  other cli nicians re sponsible  for provid ing patien t care. Pr ovider Uti lities is  enhancing  the existi ng CPRS sy stem.
  1658   One note:  CPRS’s arc hitecture  does not s upply new  services o r consume  services.
  1659   External S ystem Inte rface Desi gn
  1660   This secti on documen ts the Pro vider Util ities Delp hi GUI app lication.
  1661   Interface  Architectu re 
  1662   Provider U tilities u ses existi ng CPRS ar chitecture , to inclu de the RPC  broker an d base 508  form.
  1663   GUI Securi ty
  1664   Access to  this GUI a pplication  is restri cted using  multiple  redundant  mechanisms  and check s.
  1665   The applic ation is n ot shown i n the CPRS  Tools men u unless a  system ad min or aut horized en tity has c onfigured  it to be p resent for  a given u ser or use r group.
  1666   The applic ation will  not run w ithout 2FA  authentic ation.
  1667   The applic ation will  not run u nless a sy stem admin  or author ized entit y has conf igured the  user acce ss key “OR  PU GUI”.
  1668   Interface  Detailed D esign
  1669   Provider U tilities u ses existi ng CPRS co nventions  for commun icating wi th the Vis tA server.  See Secti on 6 for a  full list  of Vista  RPCs used  by the GUI  applicati on.
  1670    Human-Mac hine Inter face (GUI)
  1671   Interface  Design Rul es
  1672   VA standar ds, Scienc e Advisory  & Coordin ating Comm ittee (SAC C) and IBM  Common Us er Interfa ce (CUA).  This GUI a pplication  is Sectio n 508 comp liant. Whe never poss ible, code  and inter face stand ards are s hared (bor rowed unch anged) fro m the CPRS  applicati on.
  1673   Inputs
  1674   Mouse and  keyboard,  no special  or novel  input devi ce is requ ired. Drag  & drop is  supported  in the pr imary wind ow, but ke yboard, me nu and but ton altern atives are  also avai lable. Con text menus  are provi ded in mos t windows.  Command k eys can be  displayed  using the  standard  Windows me chanism of  pressing  the “ALT”  key.
  1675   Outputs
  1676   Provider R ole Change  (GUI) pro vides a si ngle optio nal text r eport afte r order re assignment . The repo rt contain ts patient  sensitive  informati on and mus t be handl ed appropr iately by  the user.  The report  is simple  text that  can be pl aced into  the Window s clipboar d for appr opriate di sposition  by the use r.
  1677   Delphi Des ign Notes
  1678   Compliance  with GUI  SAC, V1.0
  1679   The Delphi  GUI appli cation was  designed  to conform  to the st andards pr esented in  the docum ent “Graph ical User  Interface  Standards  And Conven tions (GUI  SAC)”, Ve rsion 1.0,  February  2002. No h yperlink t o this doc ument coul d be locat ed in the  VA VDL.
  1680   Windows Re gistry
  1681   This appli cation doe s not dire ctly utili ze or modi fy the Win dows Regis try. It al so does no t create a ny local f iles.
  1682   Action Lis ts
  1683   All action s availabl e to end u sers are e ncapsulate d in actio n list ite ms, making  them avai lable for  reuse from  main menu s, popup m enus, butt ons, short cuts, etc.  All enabl ing/disabl ing of GUI  controls  is control led from t ActionList .OnUpdate  events.
  1684   Section 50 8-Complian t Form Inh eritance
  1685   All forms  and dialog s using in  this appl ication ar e Section  508 compli ant. All f orms and d ialogs inh erit from  a root anc estor of t ype TFormB ase508Form  or TFormB ase508Dial og (borrow ed from CP RS).
  1686   Windows He lp
  1687   A compiled  HTML Wind ows help f ile is del ivered wit h the appl ication. C ontext-sen sitive hel p is acces sed from t he Help me nu or via  standard k eyboard sh ortcuts.
  1688  
  1689   Navigation  Hierarchy
  1690   The follow ing diagra m illustra tes the GU I navigati on flow. T he names s hown are t he window  captions –  not to be  confused  with the D elphi form  names.
  1691  
  1692   Figure 1:  GUI Naviga tion Flow
  1693   Main Form:  “Provider  Utilities : Reassign  Patient O rders”
  1694   This is th e main win dow. The u ser views  and reassi gns patien ts from cu rrent to n ew provide rs by drag ging from  left to ri ght. This  form utili zes a drag  and drop  GUI metaph or, supple mented by  command bu ttons, to  reassign p atients fr om a curre nt provide r to one o r more new  providers .
  1695  
  1696  
  1697   Figure 2:  Main Form
  1698  
  1699   Usage (opt imal progr am flow)
  1700   The main w indow enab les a 4-st ep process  to reassi gn patient s: select  current pr ovider, se lect new p rovider, m ove patien ts, review  & execute .
  1701   User opens  the appli cation and  the main  window app ears
  1702   User selec ts a curre nt provide r and orde r dates by  clicking  the button  “Choose C urrent Pro vider and  Order Date s”.
  1703   User selec ts one or  more new p roviders b y clicking  the butto n “Add New  Provider” .
  1704   User drags  patients  from the l eft list t o the righ t list, dr opping on  the desire d new prov ider. As a n alternat ive to dra g and drop , user can  utilized  the button s at scree n center t o move pat ients.
  1705   User click s the butt on “Apply  Changes” t o review a nd execute  the order  reassignm ents.
  1706   User exits  the appli cation or  repeats th is process  for addit ional prov iders.
  1707   Specific f unctionali ty
  1708   The main w indow Delp hi units a re fReassi gnOrders.p as and fRe assignOrde rs.dfm. Al l data use d in the w indow is d erived fro m the Delp hi provide r engine o bject.
  1709  
  1710   The main w indow has  this speci fic GUI fu nctionalit y:
  1711  
  1712   Selection:  The user  can select  one or mo re current  patients  at left us ing the mo use. The m ouse suppo rts Shift+ click and  Ctrl+ clic k to assis t selectin g multiple  patients.
  1713   Selection:  The user  can select  on or mor e current  patients a t left usi ng the key board. The  user can  select mul tiple pati ents by ho lding down  the Shift  key while  using the  down arro w key.
  1714   Selection:  A context  (popup) m enu will s elect or d eselect al l current  patients.
  1715   Informatio n: A list  of current  patients  is display ed at left .Informati on: A list  of new pr oviders an d assigned  patients  is display ed at righ t.
  1716   Informatio n: The mai n window a lways disp lays an up dated pati ent count  below the  current pa tients lis t.
  1717   Informatio n: The mai n window a lways disp lays (abov e the curr ent patien t list) a  caption fo r the curr ently sele cted provi der, to in clude name  and the o rder date  range.
  1718   Informatio n: The ord er count f or each cu rrent pati ent is sho wn in () f or any pat ient in th e left or  right list s.
  1719   Informatio n: The use r can “dri ll-down” i nto a pati ent’s orde rs by doub le–clickin g a patien t in the l ist at lef t. A conte xt menu al so provide s this abi lity.
  1720   Action: Th e button o r edit men u item “Ch oose Curre nt Provide r and Orde r Dates” d isplays a  modal dial og in whic h the user  can enter  the requi red data.
  1721   Action: Th e button o r edit men u item “Ad d New Prov ider” disp lays a mod al dialog  in which t he user ca n select a  new provi der.
  1722   Action: Th e button o r edit men u item “Ap ply Change s” display s a modal  dialog in  which the  user can r eview chan ges and op tionally s end them t o the serv er (or can cel).
  1723   Action: Th e button o r edit men u item “Ad d Selected ” assigns  all select ed current  patients  to the sel ected new  provider.  This actio n is enabl ed only if  a patient  is select ed at left  and a new  provider  is selecte d at right .
  1724   Action: Th e button o r edit men u item “Ad d All” ass igns all p atients at  left to t he selecte d new prov ider at ri ght. This  action is  enabled on ly if a ne w provider  is select ed at righ t.
  1725   Action: Th e button o r edit men u item “Au to Allocat e All” eve nly distri butes all  patients a t left bet ween new p roviders a t right.
  1726   Action: Th e button o r edit men u item “Un do Selecte d” will mo ve all sel ected new  patients a t right ba ck to the  current pa tient list  at left.
  1727   Action: :T he button  or edit me nu item “U ndo All” w ill move a ll new pat ients at r ight to th e current  patient li st at left .
  1728   Behavior:  Inappropri ate action s (buttons , menu ite ms) are di sabled whe n appropri ate.
  1729   Behavior:  Hot keys f or all act ions are a utomatical ly assigne d. The use r can view  hot keys  by pressin g the “Alt ” key.
  1730   Behavior:  If a patie nt is sele cted at ri ght, the p rogram wil l consider  the new p rovider pa rent to be  selected  when enabl ing/disabl ing action s.
  1731   Modal Form : “Select  Current Pr ovider” 
  1732   In this mo dal form,  the user s elects a c urrent pro vider, and  also acce pts or mod ifies the  default or der start  date and s top date.  The date r ange will  be used to  extract o rders from  the Vista  database  for the se lected cur rent provi der. The d ates are i nclusive,  meaning an y order en tered on o r after th e start da te and bef ore or on  the end da te will be  processed .
  1733   The Delphi  units for  this form  are fSele ctProvider .pas and f SelectProv ider.dfm.  The defaul t stop dat e is “now”  as obtain ed from th e Vista se rver. Prov ider names  are taken  from the  server via  the ORWU  NEWPERS M  command.
  1734  
  1735   Figure 3:  Select Cur rent Provi der
  1736   This form  is reused  to obtain  the new pr ovider. Th e only fun ctional di fference i s that the  date edit  controls  are hidden , as they  are not re levant whe n selectin g new prov iders.
  1737   Modal Form : Qualifyi ng Orders
  1738   When the u ser double -clicks a  current pa tient, the  applicati on will di splay this  modal for m. The for m displays  a list of  orders fo r the sele cted patie nt. In thi s form, th e user can  click any  order at  left and s ee an orde r detail a t right. T his form i s informat ional only  – there i s no other  functiona lity.
  1739   The Delphi  units for  this wind ow are fPa tientOrder s.pas and  fPatientOr ders.dfm.  Data for t he right p ortion of  this windo w is taken  from the  Vista M co mmand ORQO R DETAIL.  The list o f orders a t left is  obtained f rom the De lphi Provi derEngine  object.
  1740  
  1741   Figure 4:  Qualifying  Orders fo r Patient
  1742   Modal Form : Reassign  Orders (R eview and  Execute)
  1743   When the u ser clicks  the butto n “Apply C hanges” in  the main  form, this  modal for m appears.  This enfo rces a “tw o click” d esign patt ern that g ives the u ser the op portunity  to review  the propos ed changes  and cance l if desir ed. Also,  the user i s required  to modify  or accept  the defau lt executi on time, w hich is “n ow” as obt ained from  the Vista  server. A  future ti me can be  entered –  this is us eful when  a provider ’s role ch ange date  is known i n advance,  and the o rder reass ignment is  prepared  before tha t date. No t that a f ull date/t ime value  is require d.
  1744   The Delphi  units for  this wind ow are fAp plyChanges .pas and f ApplyChang es.dfm. Al l data for  this wind ow is obta ined from  the Provid erEngine D elphi obje ct.
  1745  
  1746  
  1747   Figure 5:  Reassign O rders
  1748   Modal Form : About di alog
  1749   A standard  CPRS-styl e About di alog is di splayed fr om the Hel p menu.
  1750  
  1751   Figure 6:  About Dial og
  1752  
  1753    Attachmen t A – Appr oval Signa tures
  1754   This secti on is used  to docume nt the app roval of t he System  Design Doc ument. The  review sh ould be co nducted fa ce to face  where sig natures ca n be obtai ned ‘live’  during th e review.  If unable  to conduct  a face-to -face meet ing then i t should b e held via  LiveMeeti ng and con currence c aptured du ring the m eeting. Th e Scribe s hould add  /es/name b y each pos ition cite d. Example  provided  below.
  1755   The Busine ss Sponsor  and Proje ct Manager  are requi red to sig n.
  1756  
  1757   __________ __________ __________ __________ __________ __________ __________ ________
  1758   Signed:Dat e: 
  1759   < Business  Sponsor >
  1760  
  1761   __________ __________ __________ __________ __________ __________ __________ ________
  1762   Signed:Dat e: 
  1763   < Project  Manager >
  1764  
  1765  
  1766   Additional  Informati on 
  1767   Attach any  addition  informatio n that sup plements t he design  specificat ion.
  1768   Identifica tion of Te chnology a nd Standar ds
  1769   Identify t he system  and softwa re which a pply to th e SDD, inc luding: id entificati on number( s), title( s), abbrev iation(s),  version n umber(s),  and releas e number(s ). Identif y all stan dards (e.g ., America n National  Standards  Institute  [ANSI], I nternation al Organiz ation for  Standardiz ation [ISO ], Institu te of Elec trical and  Electroni cs Enginee rs [IEEE],  etc.).
  1770   Constraini ng Policie s, Directi ves and Pr ocedures
  1771   Identify a ny constra ints or re quirements  placed on  this docu ment by po licies, di rectives,  or procedu res.
  1772   Requiremen ts Traceab ility Matr ix
  1773   Include an  RTM that  traces mod ules and d ata struct ures to th e software  requireme nts. A ref erence to  the locati on of the  RTM is als o acceptab le.
  1774   Packaging  and Instal lation
  1775   Outline an y special  considerat ions for s oftware pa ckaging an d installa tion.
  1776   Design Met rics
  1777   Describe a ll metrics  to be use d during t he design  activity.
  1778  
  1779  
  1780   Template R evision Hi story
  1781   Date
  1782   Version
  1783   Descriptio n
  1784   Author
  1785   June 2015
  1786   2.10
  1787   Changed He ading 1 de fault sett ing to eli minate pag e break be fore
  1788   Process Ma nagement
  1789   May 2015
  1790   2.9
  1791   Edited for  Section 5 08 conform ance and r emediated  with Commo n Look Off ice tool
  1792   Process Ma nagement
  1793   February 2 015
  1794   2.8
  1795   Incorporat es revisio ns from PM AS Reform  Lockdown;  namely rem oving requ irements f or informa tion that  can be obt ained from  other PMA S authorit ative sour ces.
  1796   Andrew Sla wter, Offi ce of Tech nology Str ategies
  1797   September  2014
  1798   2.7
  1799   Adds Enter prise Shar ed Service s terms an d requires  AERB Comp liance Cer tificate a ttachment.
  1800   Process Ma nagement
  1801   August 201 4
  1802   2.6
  1803   Signature  block upda te authori zed by AER B  CR_0189 34
  1804   Process Ma nagement
  1805   March 2014
  1806   2.5
  1807   Section 50 8 repairs  to new ver sion appro ved by AER B Chair ap proved 
  1808   Process Ma nagement
  1809   August 201 3
  1810   2.3
  1811   Replaced t he Service  Architect ure sub-se ction with  new sub-s ections fo r consumed  and provi ded servic es. Also a pplied mis cellaneous  feedback  from VA te am. 
  1812   ASD Enterp rise Share d Services  (ESS) Wor k Group
  1813   June 2013
  1814   1.3
  1815   Upgraded t o MS Offic e 2007-201 0 format 
  1816   Process Ma nagement
  1817   June 2013
  1818   1.2
  1819   Address in consistenc ies in Sec tion 3, Co nceptual D esign, Cor rect headi ngs 
  1820   Process Ma nagement
  1821   March 2013
  1822   1.1
  1823   Formatted  to documen tation sta ndards and  edited fo r Section  508 confor mance
  1824   Process Ma nagement
  1825   January 20 13
  1826   1.0
  1827   Initial Do cument
  1828   PMAS Busin ess Office
  1829  
  1830  
  1831   See TOGAF®  9.1, Part  III: ADM  Guidelines  & Techniq ues, Gap A nalysis on  TOGAF web site at ht tp://pubs. opengroup. org/archit ecture/tog af9-doc/ar ch/chap27. html