25. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/9/2019 3:29:23 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

25.1 Files compared

# Location File Last Modified
1 CPRS_EP1_OR_3_453.zip\CPRS_EP1_OR_3_453\OR_3_453_Documentation.zip OR_3_453_SDD.docx Tue Mar 5 20:16:14 2019 UTC
2 CPRS_EP1_OR_3_453.zip\CPRS_EP1_OR_3_453\OR_3_453_Documentation.zip OR_3_453_SDD.docx Tue Apr 9 18:58:20 2019 UTC

25.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 5 3792
Changed 4 12
Inserted 0 0
Removed 0 0

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

25.4 Active regular expressions

No regular expressions were active.

25.5 Comparison detail

  1   Provider U tilities v 1.1
  2   System Des ign Docume nt
  3  
  4  
  5  
  6   August 201 8
  7   Version 1. 6
  8  
  9   Department  of Vetera ns Affairs
  10  
  11   Revision H istory
  12   Date
  13   Version
  14   Descriptio n
  15   Author
  16   08/17/2018
  17   1.6
  18   Updates to  ORB3 rout ine to fix  transfer  to 3rd pro vider fail ure and up dates to p ost instal l routine  to slow it  down, add  checking  of status  capability  and allow ing stoppi ng & resum ing of the  EPRACDT c ross refer ence creat ion.
  19   Rob Davis
  20   05/08/2018
  21   1.5
  22   Updates to  ORCSAVE r outine whi ch had ove rlap with  OR*3*397 p atch, ther efore warr anted a fe w updates.
  23   Rob Davis
  24   03/05/2018
  25   1.4
  26   Transfer D ate/Time f ix to allo w times to  be betwee n 1 & 6 di gits long.
  27   Rob Davis
  28   10/6/2017
  29   1.3
  30   Added anot her securi ty related  RPC and A PI into ro utine.
  31   Rob Davis
  32   08/22/2017
  33   1.2
  34   Added addi tionaly in formation  to GUI sec tion, rele vant to po st-review  improvemen ts.
  35   Scott Step henson
  36   08/16/2017
  37   1.1
  38   Added new  security r elated inf ormation i nto SDD
  39   Scott Step henson
  40   Rob Davis
  41   06/21/2017
  42   1.0
  43   Initial Dr aft
  44   Scott Step henson
  45   Rob Davis
  46  
  47  
  48  
  49   Artifact R ationale
  50   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. 
  51  
  52  
  53   When to Co mplete Eac h Section  of the SDD
  54   Section
  55   Completed  On or Befo re PMAS Ph ase
  56   Rationale
  57   1 – Introd uction
  58   MS 0 Revie w; updated  thereafte r
  59   Conceptual  design sh ould infor m evaluati on of inve stments
  60   2 – Backgr ound
  61   MS 0 Revie w; updated  thereafte r
  62   Conceptual  design sh ould infor m evaluati on of inve stments
  63   3 – Concep tual Desig n
  64   MS 0 Revie w; updated  thereafte r
  65   Conceptual  design sh ould infor m evaluati on of inve stments
  66   4 – System  Architect ure
  67   MS 0 Revie w; updated  thereafte r
  68   Conceptual  design sh ould infor m evaluati on of inve stments
  69   5 – Data D esign
  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   6 – Detail ed Design
  73   MS 1 Revie w; updated  thereafte r
  74   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  75   7 – Extern al System  Interface  Design
  76   MS 1 Revie w; updated  thereafte r
  77   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  78   8 – Human  Machine In terfaces
  79   MS 1 Revie w; updated  thereafte r
  80   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  81   Attachment s
  82   MS 1 Revie w; updated  thereafte r
  83   Design det ails shoul d be elabo rated upon  during PM AS Plannin g phase an d prior to  developme nt
  84  
  85   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.
  86  
  87   Instructio ns
  88  
  89   Activity
  90   New Capabi lity (1)
  91   Feature En hancement  (2)
  92   Field Depl oyment (A)
  93   Yes
  94   New Applic ation
  95   Cloud/Web  Deployment  (B)
  96   No
  97   No
  98   Mobile App lication ( C)
  99   No
  100   No
  101  
  102   Table of C ontents
  103   1.Introduc tion1
  104   1.1.Scope1
  105   1.2.User P rofiles1
  106   2.Backgrou nd1
  107   2.1.Overvi ew of the  System1
  108   2.2.Overvi ew of the  Business P rocess1
  109   2.3.Overvi ew of the  Significan t Requirem ents2
  110   3.Conceptu al Design2
  111   3.1.Concep tual Appli cation Des ign2
  112   3.1.1.Appl ication Co ntext3
  113   3.1.2.High -Level App lication D esign4
  114   3.1.3.Appl ication Lo cations5
  115   3.2.Concep tual Data  Design6
  116   3.2.1.Proj ect Concep tual Data  Model6
  117   3.2.2.Data base Infor mation6
  118   3.2.3.User  Interface  Data Mapp ing7
  119   3.2.3.1.Ap plication  Screen Int erface7
  120   3.2.3.2.Ap plication  Report Int erface7
  121   3.2.3.3.Un mapped Dat a Element7
  122   3.3.Concep tual Infra structure  Design7
  123   3.3.1.Syst em Critica lity and H igh Availa bility8
  124   3.3.2.Spec ial Techno logy8
  125   3.3.3.Tech nology Loc ations8
  126   3.3.4.Conc eptual Inf rastructur e Diagram8
  127   3.3.4.1.Lo cation of  Environmen ts and Ext ernal Inte rfaces8
  128   3.3.4.2.Co nceptual P roduction  String Dia gram8
  129   4.System A rchitectur e9
  130   4.1.Hardwa re Archite cture9
  131   4.2.Softwa re Archite cture10
  132   4.3.Networ k Architec ture10
  133   4.4.Servic e Oriented  Architect ure / ESS1 1
  134   4.5.Enterp rise Archi tecture11
  135   5.Data Des ign11
  136   5.1.DBMS F iles11
  137   5.2.Non-DB MS Files11
  138   5.3.Data V iew12
  139   6.Detailed  Design12
  140   6.1.Hardwa re Detaile d Design12
  141   6.2.Softwa re Detaile d Design12
  142   6.2.1.Delp hi GUI Cod e Overview 12
  143   6.2.1.1.GU I Vista Re mote Proce dure Calls  (RPC)12
  144   6.2.1.1.1. ORWU DT [N ow]12
  145   6.2.1.1.2. ORQOR DETA IL [OrderI EN, Patien tIEN]12
  146   6.2.1.1.3. ORWU NEWPE RS [Provid er]12
  147   6.2.1.1.4. ORQ3 EN [P roviderIEN , StartDat e, EndDate ]12
  148   6.2.1.1.5. ORQ3 XFER  [Order Lis t]12
  149   6.2.1.1.6. ORWU VERSR V13
  150   6.2.1.1.7. ORWU USERI NFO13
  151   6.2.1.1.8. ORQ3 AUTHU SR13
  152   6.2.1.2.De lphi Units 13
  153   6.2.2.Conc eptual Des ign14
  154   6.2.2.1.Pr oduct Pers pective14
  155   6.2.2.1.1. User Inter faces14
  156   6.2.2.1.2. Hardware I nterfaces1 4
  157   6.2.2.1.3. Software I nterfaces1 5
  158   6.2.2.1.4. Communicat ions Inter faces15
  159   6.2.2.1.5. Memory Con straints15
  160   6.2.2.1.6. Special Op erations15
  161   6.2.2.2.Pr oduct Feat ures15
  162   6.2.2.3.Us er Charact eristics15
  163   6.2.2.4.De pendencies  and Const raints15
  164   6.2.3.Spec ific Requi rements16
  165   6.2.3.1.Da tabase Rep ository16
  166   6.2.3.2.Sy stem Featu res20
  167   6.2.3.2.1. NSR # 2013 0504 – Pro vider Role  Change En hancement2 0
  168   6.2.3.2.1. 1.OR3P4532 0
  169   6.2.3.2.1. 2.ORB3 Rou tine22
  170   6.2.3.2.1. 3.ORCSAVE  Routine24
  171   6.2.3.2.1. 4.ORELR5 R outine28
  172   6.2.3.2.1. 5.ORQ2 Rou tine31
  173   6.2.3.2.1. 6.ORQ3 Rou tine33
  174   6.2.3.2.2. Remote Pro cedure Cal l (RPC)36
  175   6.3.Networ k Detailed  Design37
  176   6.4.Securi ty and Pri vacy38
  177   6.4.1.Secu rity38
  178   6.4.2.Priv acy38
  179   6.5.Servic e Oriented  Architect ure / ESS  Detailed D esign39
  180   7.External  System In terface De sign39
  181   7.1.Interf ace Archit ecture39
  182   7.1.1.GUI  Security39
  183   7.2.Interf ace Detail ed Design3 9
  184   8.Human-Ma chine Inte rface39
  185   8.1.Interf ace Design  Rules39
  186   8.2.Inputs 39
  187   8.3.Output s39
  188   8.4.Naviga tion Hiera rchy40
  189   8.4.1.Main  Form: “Pr ovider Uti lities: Re assign Pat ient Order s”40
  190   8.4.1.1.Us age (optim al program  flow)41
  191   8.4.1.2.Sp ecific fun ctionality 41
  192   8.4.2.Moda l Form: “S elect Curr ent Provid er”42
  193   8.4.3.Moda l Form: Qu alifying O rders43
  194   8.4.4.Moda l Form: Re assign Ord ers (Revie w and Exec ute)44
  195   8.4.5.Moda l Form: Ab out dialog 45
  196   9.Attachme nt A – App roval Sign atures45
  197   A.Addition al Informa tion47
  198   A.1.Identi fication o f Technolo gy and Sta ndards47
  199   A.2.Constr aining Pol icies, Dir ectives an d Procedur es47
  200   A.3.Requir ements Tra ceability  Matrix47
  201   A.4.Packag ing and In stallation 47
  202   A.5.Design  Metrics47
  203  
  204   Introducti on
  205   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.
  206   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,
  207   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.
  208   Scope
  209   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.
  210  
  211   User Profi les
  212   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:
  213   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.
  214   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. 
  215   Background
  216   Overview o f the Syst em
  217   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.
  218  
  219   Overview o f the Busi ness Proce ss
  220   Provider U tilities s upports th e followin g business  processes :
  221   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 ).
  222  
  223  
  224   Overview o f the Sign ificant Re quirements
  225  
  226   Link to th e consolid ated RSD:  http:// DNS . URL /pasdocs/a nalysis/20 150609_CPR S %20 Enhancemen ts %20 Phase %20 I_BRD.zip
  227  
  228   Link to th e NSR:     http:// DNS . URL /nsrd/Tab_ GeneralInf oview.asp? RequestID= 20130504
  229   Link to RT M:      http:// DNS . URL /pasdocs/t raceabilit y/20150609 _CPRS %20 Enhancemen ts %20 Phase %20 I_RTM.xlsx
  230  
  231   Conceptual  Design
  232   Conceptual  Applicati on Design
  233   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) .
  234   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.
  235   This proje ct compris es changes  in both M  and Delph i.
  236   VISTA Appl ication Co ntext
  237   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. 
  238  
  239  
  240    Applicati on Context  Diagram
  241   Table 5 (G rouping):  Applicatio n Context  Descriptio n
  242   Object
  243   ID
  244   Name
  245   Descriptio n
  246   Interface  Name
  247   Interface  System
  248   1
  249   Provider U tiliities
  250  
  251   Computeriz ed Patient  Record Sy stem (CPRS )
  252   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.
  253   RPC Broker
  254   VistA
  255   2
  256   VistA
  257   VistA is t he primary  data stor e for Pati ent and He alth relat ed informa tion.  
  258   RPC Broker
  259   CPRS
  260   Interfaces  External  to OIT
  261   CPRS does  not contai n any inte rfaces ext ernal to O IT.
  262   Interfaces  Internal  to OIT
  263   ID
  264   Name
  265   Related Ob ject
  266   Input Mess ages
  267   Output Mes sages
  268   External P arty
  269   1I
  270   RPC Broker
  271   CPRS (1)
  272   VistA (2)
  273   Message co ntaining a  request f or informa tion or or der inform ation
  274   Requested  informatio n, or noti fication o f success.
  275   N/A
  276   High-Level  Applicati on Design
  277  
  278  
  279   High-Level  Applicati on Design
  280  
  281  
  282   Table 6: O bjects in  the High L evel Appli cation Des ign
  283   Objects /  Components  to be Bui lt or Modi fied
  284   Internal D ata Stores
  285   ID
  286   Name
  287   Data Store d
  288   Steward
  289   Access
  290   2 VistA (O rder reass ignment tr acking)
  291   Order Reas signment T racking
  292   From Provi der
  293   To Provide rUser Requ esting Rea ssignment
  294   Date Time  of Reassig nment
  295   OR-Order R eassignmen t Tracking
  296   Create
  297   Retrieve
  298    
  299   Applicatio n Location s
  300   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 .
  301   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 .
  302   Table 7: A pplication  Locations
  303   Applicatio n Componen t
  304   Descriptio n
  305   Location a t Which Co mponent is  Run
  306   Type
  307   CPRS
  308   Provider R ole Change
  309   Executable
  310   Workstatio ns located  throughou t each VAM C. 
  311   Presentati on Logic a lthough th ere is som e business  logic con tained in  the execut able.
  312   VistA Serv er
  313   Database w hich also  contains t he server  side execu table code  of the Vi stA applic ations.
  314   VistA serv ers are lo cated eith er in loca l VAMCs or  at region al data pr ocessing c enters.
  315   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.
  316   Table 8: A pplication  Users
  317   Applicatio n Componen t
  318   Location
  319   User
  320   Provider R ole Change
  321   CPRS
  322   VistA Serv er
  323   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
  324   Physician
  325   Clinical A pplication s Coordina tor
  326   Conceptual  Data Desi gn
  327   Project Co nceptual D ata Model
  328   Project Co nceptual D ata Model
  329  
  330  
  331   Database I nformation
  332   Table 9: D atabase In ventory
  333   Database N ame
  334   Descriptio n
  335   Type
  336   Steward
  337   VistA
  338   M/Cache da tabase con taining cl inical and  non-clini cal data f or all Vis tA applica tion
  339   Modify
  340   Overall, t he VA is t he steward  of the da tabase in  its’ entir ety.
  341   Specifical ly, data i s being mo dified in  data that  is owned b y Pharmacy , CPRS, Ke rnel and L aboratory.
  342   User Inter face Data  Mapping
  343   Applicatio n Screen I nterface
  344   See sectio n 8 for a  full descr iption of  the Provid er Utilite s GUI hier archy.
  345   Applicatio n Report I nterface
  346   N/A.
  347   Unmapped D ata Elemen t
  348   Currently,  there are  no new da ta element s being ad ded that a re not map ped to a u ser interf ace.
  349   Conceptual  Infrastru cture Desi gn
  350  
  351  
  352  
  353   System Cri ticality a nd High Av ailability  
  354   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.
  355   Special Te chnology
  356   N/A
  357   Technology  Locations
  358   Table 13:  Technology  Location  Details
  359   Technology  Component
  360   Production  1
  361   Location
  362   Usage
  363   Workstatio ns
  364   VAMCs
  365   CBOCs
  366   Remote (th rough CAG  and VPN)
  367   Clinicians  and suppo rt staff
  368   Special Ha rdware
  369   None
  370  
  371   Interface  Processors
  372   None
  373   None
  374   Legacy Mai nframe
  375   None
  376  
  377   Legacy App lication S erver
  378   None
  379  
  380   Legacy Dat abases
  381   Local
  382   Regional
  383   Houses Vis tA databas e.
  384   Other
  385   None
  386  
  387  
  388  
  389   Conceptual  Infrastru cture Diag ram
  390   Location o f Environm ents and E xternal In terfaces
  391   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.
  392   Provider U tilities a nd CPRS is  designed  to fit wit hin whatev er environ ment exist s: either  local or r egional.
  393   Conceptual  Productio n String D iagram
  394  
  395  
  396   Conceptual  Productio n String D iagram
  397   System Arc hitecture
  398   Hardware A rchitectur e
  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. As  such, it  utilizes t he existin g VistA ha rdware arc hitecture.
  401   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.
  402   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.
  403   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.
  404   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.
  405   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 .
  406  
  407   Software A rchitectur e
  408   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.
  409   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.
  410   Network Ar chitecture
  411   Provider U tilities i s a CPRS a djunct app lication.  It follows  and utili zes CPRS c onventions , describe d below.
  412   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.
  413   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.
  414   Reference  the hardwa re archite cture for  a high-lev el overvie w of the c ommunicati on pathway s.
  415   Service Or iented Arc hitecture  / ESS
  416   Provider U tilities i s a CPRS a djunct app lication.  It follows  and utili zes CPRS c onventions , describe d below.
  417   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 .
  418   Note: CPRS ’s archite cture does  not suppl y new serv ices or co nsume serv ices.
  419   Enterprise  Architect ure
  420   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.
  421   The server  side code  is writte n using Ca che/MUMPS,  which is  approved u nder the T RM.
  422   Data Desig n
  423   DBMS Files  
  424   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.
  425  
  426   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 .
  427   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) .
  428   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.
  429  
  430   Section 6. 2.2 contai ns the spe cifics of  the data d ictionary  updates.
  431  
  432   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 .
  433   Non-DBMS F iles
  434   N/A
  435   Data View 
  436   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.
  437  
  438   Detailed D esign
  439   Hardware D etailed De sign
  440   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.
  441   Software D etailed De sign 
  442   Delphi GUI  Code Over view
  443   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. 
  444   GUI Vista  Remote Pro cedure Cal ls (RPC)
  445   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.
  446   ORWU DT [N ow]
  447   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.
  448   ORQOR DETA IL [OrderI EN, Patien tIEN]
  449   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.
  450   ORWU NEWPE RS [Provid er]
  451   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.
  452   ORQ3 EN [P roviderIEN , StartDat e, EndDate ]
  453   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.
  454   ORQ3 XFER  [Order Lis t]
  455   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.
  456   ORWU VERSR V
  457   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.
  458   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.
  459   ORWU USERI NFO
  460   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.
  461   ORQ3 AUTHU SR
  462   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.
  463   ORQ3 CHKPA TCH
  464   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.
  465  
  466   Delphi Uni ts
  467   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.
  468   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.
  469   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.
  470   fAbout.pas  & .dfm: T he Delphi  source cod e for the  “About” di alog.
  471   fBase508Di alog.pas &  .dfm: The  Delphi so urce code  for the an cestor to  all popup  dialog win dows.
  472   fBase508Fo rm.pas & . dfm: The D elphi sour ce code fo r the ance stor to al l applicat ion forms.
  473   fReassignO rders.pas  & .dfm: Th e Delphi s ource for  the main w indow.
  474   fApplyChan ges.pas &  .dfm: The  Delphi sou rce code f or the “Re view and A pply Chang es” window .
  475   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.
  476   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.
  477   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).
  478   fPatientOr ders.pas &  .dfm: The  Delphi so urce code  for the or ders displ ay form. 
  479   fProgramIn formation. pas & .dfm : The Delp hi souce c ode for th e “About”  form.
  480   Utilities. pas: The D elphi sour ce code fo r some sup port utili ties.
  481   fGN_RPCLog .pas & .df m: Borrowe d from Gro up Notes a pplication . A loggin g window f or RPC deb ugging.
  482   UInit.pas:  Manages t imeout fun ctionality . Borrowed  from CPRS .
  483   Conceptual  Design
  484   Product Pe rspective
  485   DNS.URL
  486   DNS.URL
  487  
  488   User Inter faces
  489   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.
  490   For all Vi stA (serve r side) ch anges, the  user inte rface will  be roll a nd scroll.
  491  
  492  
  493   Hardware I nterfaces
  494   Provider U tilities i s a CPRS a djunct app lication. 
  495   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 .
  496   Currently,  CPRS, uti lizing the  Kernel sy stem will  support an y device t hat Kernel  supports.
  497   Software I nterfaces
  498   Provider U tilities i s a CPRS a djunct app lication. 
  499   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.
  500   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.
  501  
  502   Communicat ions Inter faces
  503   Provider U tilities i s a CPRS a djunct app lication. 
  504   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.
  505   Memory Con straints
  506   N/A
  507   Special Op erations
  508   N/A
  509   Product Fe atures
  510   Please ref er to Sect ion 2.3 an d Section  8.
  511   User Chara cteristics
  512   Provider U tilities i s a CPRS a djunct app lication.
  513   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.
  514   Dependenci es and Con straints
  515  
  516   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.
  517   Provider U tilities i s not 508  compliant.
  518   Specific R equirement s
  519   Database R epository
  520   The data f or CPRS Pr ovider Rol e Change w ill reside  in the ex isting Vis tA databas e.
  521   Modificati ons (shown  in Yellow ) to Field s in ORDER  ACTIONS M ultiple of  ORDER Fil e (#100):
  522   100.008,.0 1     DATE /TIME ORDE RED      0 ;1 DATE (R equired)
  523  
  524                    INPU T TRANSFOR M:  S %DT= "ETXR" D ^ %DT S X=Y  K:Y<1 X
  525                    LAST  EDITED:       MAY 16 , 2017 
  526       HELP-P ROMPT:       Enter th e date/tim e this act ion was             
  527                           Ordered.
  528       DESCRI PTION:       This is  the date/t ime this a ction was
  529                                        ordere d.  
  530  
  531                    CROS S-REFERENC E:  100^AC T3^MUMPS 
  532   1)= N ORDA  S ORDA=DA (1) D   AC T1^ORDD100 A(ORDA,DA)
  533  
  534   2)= N ORDA  S ORDA=DA (1) D ACT2 ^ORDD100A( ORDA,DA)
  535   ^OR(100,"A CT",ORVP,9 999999- OR LOG,ORDG,O RIFN,DA) 
  536                                      Allows r etrieval o f orders i n
  537                                      reverse- chronologi cal order.   
  538  
  539                    CROS S-REFERENC E:100^AC1^ MUMPS 
  540   1)= N X1,X 2 S X1=DA( 1),X2=DA D  SET^ORDD1 00(X1,X2)
  541  
  542   2)= N X1,X 2 S X1=DA( 1),X2=DA D  KIL^ORDD1 00(X1,X2)
  543                                      ^OR(100, "AC",ORVP, 9999999-OR LOG,ORIFN, DA) 
  544                                      Allows r etrieval o f "active"  orders; i ncludes
  545                                      orders w ith any ki nd of acti ve status,  as   
  546     well as  those that  have ende d w/in the
  547     Active O rders Cont ext Hours.   
  548  
  549                    CROS S-REFERENC E:100^AS1^ MUMPS 
  550   1)= N ORDA  S ORDA=DA (1) D   S1 ^ORDD100(O RDA,DA,"", X)
  551  
  552   2)= N ORDA  S ORDA=DA (1) D  S2^ ORDD100(OR DA,DA,"",X )
  553                                      ^OR(100, "AS",ORVP, 9999999-OR LOG,ORIFN, DA) 
  554                                      Allows r etrieval o f unsigned  orders.  
  555  
  556  
  557                    CROS S-REFERENC E:100^AF 
  558                                      1)= S ^O R(100,"AF" ,$E(X,1,30 ),DA(1),DA )=""
  559                                      2)= K ^O R(100,"AF" ,$E(X,1,30 ),DA(1),DA )
  560  
  561                    RECO RD INDEX:    EPRACDT  (#1454)     REGULAR     IR
  562                                      LOOKUP &  SORTING     WHOLE FI LE (#100)
  563                      Sh ort Descr:   Index on  PROVIDER  & ACTION D ATE/TIME f or
  564                                      Activiti es
  565                      De scription:   This ind ex will be  used as p art of the  new  
  566                                      ORQ3 EN  Remote Pro cedure Cal l to speed ily 
  567                                      pick up  all Orders  for a spe cific Orde ring 
  568                                      Provider  and withi n a date r ange that  has 
  569                                      been sel ected by t he end use r so that  the 
  570                                      Orders t hat come u p can be R e-Assigned  
  571                                      (Transfe rred) to o ne or more  New Provi ders.
  572                         Set Logic:   S ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )=""
  573                       K ill Logic:   K ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )
  574                       W hole Kill:   K ^OR(10 0,"EPRACDT ")
  575                              X(1):   PROVIDER   (100.008 ,3)  (Subs cr 1)  (fo rwards)
  576                              X(2):   DATE/TIM E ORDERED   (100.008, .01)  (Sub scr 2)
  577                                      (forward s)
  578  
  579   100.008,3        PROV IDER              0;3  POINTER T O NEW PERS ON FILE (# 200)
  580  
  581                    LAST  EDITED:     MAY 16,  2017 
  582                    HELP -PROMPT:     Enter th e name of  the reques ting clini cian
  583                                      for this  order. 
  584                    DESC RIPTION:
  585                                      This is  the reques tor of thi s order.  
  586  
  587                    RECO RD INDEX:    EPRACDT  (#1454)     REGULAR     IR
  588                                      LOOKUP &  SORTING     WHOLE FI LE (#100)
  589                      Sh ort Descr:   Index on  PROVIDER  & ACTION D ATE/TIME f or
  590                                      Activiti es
  591                      De scription:   This ind ex will be  used as p art of the  new  
  592                                      ORQ3 EN  Remote Pro cedure Cal l to speed ily 
  593                                      pick up  all Orders  for a spe cific Orde ring 
  594                                      Provider  and withi n a date r ange that  has 
  595                                      been sel ected by t he end use r so that  the 
  596                                      Orders t hat come u p can be R e-Assigned  
  597                                      (Transfe rred) to o ne or more  New Provi ders.
  598                         Set Logic:   S ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )=""
  599                       K ill Logic:   K ^OR(10 0,"EPRACDT ",X(1),X(2 ),DA(1),DA )
  600                       W hole Kill:   K ^OR(10 0,"EPRACDT ")
  601                              X(1):   PROVIDER   (100.008 ,3)  (Subs cr 1)  (fo rwards)
  602                              X(2):   DATE/TIM E ORDERED   (100.008, .01)  (Sub scr 2)
  603                                      (forward s)
  604  
  605   New ORDER  TRANSFERS  Multiple ( along with  New Style  Cross Ref erence) wi thin ORDER  File (#10 0):
  606  
  607   100,70         ORDER  TRANSFERS         11; 0 DATE Mul tiple #100 .011
  608  
  609                  DESCRI PTION:       This is  the list o f Order Tr ansfers th at have
  610                                      occurred  transferr ing to a n ew Provide r from 
  611                                      an old o ne.  
  612  
  613  
  614   100.011,.0 1     TRAN SFER DATE/ TIME     0 ;1 DATE (R equired)
  615  
  616                    INPU T TRANSFOR M:  S %DT= "ETXR" D ^ %DT S X=Y  K:Y<1 X
  617                    LAST  EDITED:       JUN 01 , 2017 
  618                    HELP -PROMPT:       Enter  the Date/T ime of the  Order Tra nsfer. 
  619                    DESC RIPTION:
  620                                        This i s the Date /Time of t he Order
  621                                        Transf er.  
  622  
  623                    CROS S-REFERENC E:  100.01 1^B 
  624                                        1)= S    
  625                                        ^OR(10 0,DA(1),11 ,"B",$E(X, 1,30),DA)= ""
  626                                        2)= K  ^OR(100,DA (1),11,"B" ,$E(X,1,30 ),DA)
  627  
  628                    RECO RD INDEX:      EPRTRD T (#1332)     REGULAR     IR
  629                                        LOOKUP  & SORTING     WHOLE  FILE (#100 )
  630                         Short Desc r:  Index  on TRANSFE RRED TO Pr ovider and    
  631                                        TRANSF ER DATE/TI ME
  632                         Descriptio n:  This i ndex will  be used as  part of t he new
  633                                        ORQ3 E N Remote P rocedure C all to spe edily
  634                                        pick u p all Orde rs which h ave alread y been
  635                                        transf erred from  the origi nal Orderi ng
  636                                        Provid er to one  or more Ne w Provider s in 
  637                                        the ca se where a  New Provi der also h appens 
  638                                        to nee d his or h er Orders  transferre d to a 
  639                                        third  New Provid er, then t his index  can 
  640                                        then b e conduciv e to this  type of sc enario.  
  641                                        It wor ks similar  to EPRACD T Index bu t will 
  642                                        utiliz e TRANSFER RED TO Pro vider & TR ANSFER 
  643                                        DATE/T IME to qui ckly bring  up Orders  for 
  644                                        additi onal Re-As signment ( Transfer).
  645                           Set Logi c:  S ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)=""
  646                          Kill Logi c:  K ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)
  647                          Whole Kil l:  K ^OR( 100,"EPRTR DT")
  648                                X(1 ):  TRANSF ERRED TO   (100.011,. 03)  (Subs cr 1)
  649                                        (forwa rds)
  650                                X(2 ):  TRANSF ER DATE/TI ME  (100.0 11,.01) (S ubscr 
  651                                        2) (fo rwards)
  652  
  653  
  654   100.011,.0 2     TRAN SFERRED FR OM       0 ;2 POINTER  TO NEW PE RSON FILE  (#200)
  655                                         (Requ ired)
  656  
  657                    LAST  EDITED:       MAY 04 , 2017 
  658                    HELP -PROMPT:       Enter  the Provid er that th is Order i s being 
  659                                        Transf erred From
  660                    DESC RIPTION:       This i s the Prov ider that  this Order  is  
  661                                        being  Transferre d From.  
  662  
  663  
  664   100.011,.0 3     TRAN SFERRED TO          0 ;3 POINTER  TO NEW PE RSON FILE  (#200)
  665                                         (Requ ired)
  666  
  667                    LAST  EDITED:       JUN 01 , 2017 
  668                    HELP -PROMPT:       Enter  in the Pro vider that  this Orde r is 
  669                                        being  Transferre d To. 
  670                    DESC RIPTION:       This i s the Prov ider to wh ich this O rder is
  671                                        being  Transferre d.  
  672  
  673                    RECO RD INDEX:      EPRTRD T (#1332)     REGULAR     IR
  674                                        LOOKUP  & SORTING     WHOLE  FILE (#100 )
  675                         Short Desc r:  Index  on TRANSFE RRED TO Pr ovider and    
  676                                        TRANSF ER DATE/TI ME
  677                         Descriptio n:  This i ndex will  be used as  part of t he new
  678                                        ORQ3 E N Remote P rocedure C all to spe edily
  679                                        pick u p all Orde rs which h ave alread y been
  680                                        transf erred from  the origi nal Orderi ng
  681                                        Provid er to one  or more Ne w Provider s in 
  682                                        the ca se where a  New Provi der also h appens 
  683                                        to nee d his or h er Orders  transferre d to a 
  684                                        third  New Provid er, then t his index  can 
  685                                        then b e conduciv e to this  type of sc enario.  
  686                                        It wor ks similar  to EPRACD T Index bu t will 
  687                                        utiliz e TRANSFER RED TO Pro vider & TR ANSFER 
  688                                        DATE/T IME to qui ckly bring  up Orders  for 
  689                                        additi onal Re-As signment ( Transfer).
  690                           Set Logi c:  S ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)=""
  691                          Kill Logi c:  K ^OR( 100,"EPRTR DT",X(1),X (2),DA(1), DA)
  692                          Whole Kil l:  K ^OR( 100,"EPRTR DT")
  693                                X(1 ):  TRANSF ERRED TO   (100.011,. 03)  (Subs cr 1)
  694                                        (forwa rds)
  695                                X(2 ):  TRANSF ER DATE/TI ME  (100.0 11,.01)  ( Subscr 
  696                                        2) (fo rwards)
  697  
  698  
  699   100.011,.0 4     TRAN SFER USER           0 ;4 POINTER  TO NEW PE RSON FILE  (#200)
  700                                         (Requ ired)
  701  
  702                    LAST  EDITED:       MAY 04 , 2017 
  703                    HELP -PROMPT:       Enter  in the Use r that per formed thi s Order 
  704                                        Transf er. 
  705                    DESC RIPTION:       This i s the User  who perfo rmed the O rder
  706                                        Transf er.  
  707  
  708  
  709         FILE S POINTED  TO                        FIELDS
  710  
  711   NEW PERSON  (#200)                   ORDER  TRANSFERS: TRANSFERRE D FROM (#. 02)
  712                                        TRANSF ERRED TO ( #.03)
  713                                        TRANSF ER USER (# .04)
  714  
  715   System Fea tures
  716   Please ref er to the  RSD using  this link:
  717   http:// DNS . URL /pasdocs/a nalysis/20 150609_CPR S %20 Enhancemen ts %20 Phase %20 I_BRD.zip
  718  
  719  
  720   NSR # 2013 0504 – Pro vider Role  Change En hancement
  721   OR3P453
  722   Routines
  723   Activities
  724   Routine Na me
  725   OR3P453
  726   Enhancemen t Category
  727    New
  728    Modify
  729    Delete
  730    No Change
  731   RTM
  732  
  733   Related Op tions
  734   N/A
  735  
  736   Related Ro utines
  737   Routines “ Called By”
  738   Routines “ Called”   
  739  
  740   Called by  Installati on of OR*3 .0*453 by  Installing  User
  741   %ZTLOAD, D IK, DIR, X LFDT, XMD,  XPDUTL
  742   Routines
  743   Activities
  744   Data Dicti onary (DD)  Reference s
  745   N/A
  746   Related Pr otocols
  747   N/A
  748   Related In tegration  Control Re gistration s (ICRs)
  749   N/A
  750   Data Passi ng
  751    Input
  752    Output Re ference
  753    Both
  754    Global Re ference
  755    Local
  756   Input Attr ibute Name  and Defin ition
  757   Name:  
  758   Definition
  759   Output Att ribute Nam e and Defi nition
  760   Name:
  761   Definition :
  762  
  763   Current Lo gic
  764   N/A
  765  
  766   Modified L ogic (Chan ges are in  bold)
  767   OR3P453  ; SLC/RBD -  Post Insta ll 453 ;Au g 14, 2018 @09:15
  768            ; ;3.0;ORDER  ENTRY/RES ULTS REPOR TING;**453 **;Dec 17,  1997
  769            ;
  770   ENV      ;  ensure th at user un derstands  what is ab out to hap pen with c reation
  771            ;  of New St yle cross  reference.
  772            N  DIR,DIRUT ,DTOUT,DUO UT,Y
  773            S  XPDABORT= ""
  774            W  !!,$C(7), "****** Cr eation of  New Style  'EPRACDT'  Cross Refe rence **** **",!
  775            W  !,"This w ill loop t hrough the  ORDER ACT IONS Multi ple of the  entire OR DER"
  776            W  !,"File ( #100) and  create the  'EPRACDT'  New Style  Cross Ref erence bas ed"
  777            W  !,"on the  PROVIDER  & DATE/TIM E ORDERED  sub-fields .",!
  778            W  !,"WARNIN G: Once yo u agree to  create th is, you sh ould let i t run unti l"
  779            W  !,"it has  finished  completely  !!",!
  780            S  DIR("A")= "Are you s ure you wa nt to do t his"
  781            S  DIR("A",1 )="You are  about to  create the  index whi ch could t ake quite  awhile."
  782            S  DIR("B")= "NO"
  783            S  DIR(0)="Y "
  784            D  ^DIR
  785            I  $D(DIRUT) !$D(DTOUT) !$D(DUOUT) !(Y'=1) W  !!,"Ok, I  am stoppin g the inst all." S XP DABORT=1 Q
  786            E   W !,"Ok,  let's con tinue!",!
  787            I  XPDABORT= "" K XPDAB ORT
  788            Q
  789            ;
  790   POST     ;  Post-Inst all for OR *3.0*453
  791            ;  This will  assist wi th EPRACDT  cross ref erence cre ation alon g with
  792            ;  Creation  of new EPR ACDT Indic es
  793            N  ORMSG
  794            S  ORMSG(1)= "This patc h will cre ate a new  New Style  cross refe rence"
  795            S  ORMSG(2)= "called 'E PRACDT' wh ich will b e at the O RDER file  level"
  796            S  ORMSG(3)= "but on PR OVIDER & D ATE/TIME O RDERED sub -fields of  the"
  797            S  ORMSG(4)= "ORDER ACT IONS Multi ple."
  798            S  ORMSG(5)= " "
  799            S  ORMSG(6)= "Creation  of 'EPRACD T' will no w go forwa rd in the"
  800            S  ORMSG(7)= "Backgroun d."
  801            S  ORMSG(8)= " "
  802            S  ORMSG(9)= "You will  be given a  TaskMan t ask # to c heck on or ,"
  803            S  ORMSG(10) ="alternat ely, you c an check y our mail o n MailMan  for a"
  804            S  ORMSG(11) ="message  expressing  Completio n of this  Task with"
  805            S  ORMSG(12) ="appropri ate detail s."
  806            S  ORMSG(13) =" "
  807            S  ORMSG(14) ="Note Ins tall of th is Patch c annot be c onsidered"
  808            S  ORMSG(15) ="Complete  unless an d until th is Task is  Completed ."
  809            S  ORMSG(16) =" "
  810            S  ORMSG(17) ="Note als o that the  Status of  the 'EPRA CDT' Creat ion"
  811            S  ORMSG(18) ="can be c hecked by  requesting  IT to run  'D CHECK^ OR3P453'"
  812            S  ORMSG(19) ="at the C ommand Pro mpt."
  813            S  ORMSG(20) =" "
  814            D  BMES^XPDU TL(.ORMSG)
  815            I  $D(^XTMP( "OR3P453", "START"))  D
  816            .  D MES^XPD UTL("Task  to Create  'EPRACDT'  Already Be gun "_$$HT E^XLFDT(^X TMP("OR3P4 53","START "))_".")
  817            .  D MES^XPD UTL("")
  818            I  $D(^XTMP( "OR3P453", "FINISH"))  D  Q
  819            .  D MES^XPD UTL("...an d Complete d "_$$HTE^ XLFDT(^XTM P("OR3P453 ","FINISH" ))_".")
  820            .  D MES^XPD UTL("")
  821            I  $D(^XTMP( "OR3P453", "STOPPED") ) D  G SKP QUIT
  822            .  D MES^XPD UTL("...an d Stopped  "_$$HTE^XL FDT(^XTMP( "OR3P453", "STOPPED") )_".")
  823            .  D MES^XPD UTL(""),ME S^XPDUTL(" ...Resumin g 'EPRACDT ' Creation ."),MES^XP DUTL("")
  824            Q :$D(^XTMP( "OR3P453") )
  825   SKPQUIT  ;
  826            S  ZTRTN="SE TXREF^OR3P 453",ZTIO= "",ZTDTH=$ H
  827            S  ZTDESC="C reation of  New Style  X-Ref 'EP RACDT' in  ORDER file " D ^%ZTLO AD
  828            I  $G(ZTSK)  D MES^XPDU TL("Task # "_ZTSK_" q ueued to s tart "_$$H TE^XLFDT($ G(ZTSK("D" )))) I 1
  829            E   D MES^XP DUTL("**** * UNABLE T O QUEUE CR EATION OF  'EPRACDT'  ORDER FILE  X-REF *** **")
  830            K  ZTRTN,ZTI O,ZTDTH,ZT DESC,ZTSK
  831            Q
  832            ;
  833   SETXREF  ;  Set new E PRACDT New  Style cro ss referen ce for old  data
  834            N  CNT,CNT2, DA,DIK,LAS TREC,ORIEN ,STOP,XTMP CNT,XTMPMS G,ZTREQ
  835            S  U="^" S S TOP=0 I $G (^XTMP("OR 3P453","ST OPPED"))]" " D  G RES UME
  836            .  K ^XTMP(" OR3P453"," STOPPED")  S XTMPCNT= $O(^XTMP(" OR3P453","  "),-1)
  837            K  ^XTMP("OR 3P453")
  838            S  ^XTMP("OR 3P453",0)= $$FMADD^XL FDT($$DT^X LFDT(),90)
  839            S  ^XTMP("OR 3P453","ST ART")=$H
  840            S  ^XTMP("OR 3P453","RE CTOTAL")=$ P($G(^OR(1 00,0)),U,4 )
  841            S  XTMPCNT=0
  842            S  XTMPCNT=X TMPCNT+1
  843            S  XTMPMSG=" Creation o f 'EPRACDT ' X-Ref fo r ORDER fi le Started  "
  844            S  XTMPMSG=X TMPMSG_$$H TE^XLFDT(^ XTMP("OR3P 453","STAR T"))_"."
  845            S  ^XTMP("OR 3P453",XTM PCNT)=XTMP MSG
  846            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=" "
  847   RESUME   ;  Possibly  resume her e if previ ously stop ped
  848            S  LASTREC=$ G(^XTMP("O R3P453","L AST_REC_PR OCESSED"))
  849            S  ORIEN=$P( LASTREC,U, 1),CNT=$P( LASTREC,U, 2)
  850            I  ORIEN=""  S ORIEN="  ",CNT=0 K  ^OR(100,"E PRACDT")
  851            F   S ORIEN= $O(^OR(100 ,ORIEN),-1 ) Q:'ORIEN   D  I STO P Q
  852            .  S DIK="^O R(100,"_OR IEN_",8,", DIK(1)=".0 1^EPRACDT" ,DA(1)=ORI EN D ENALL ^DIK
  853            .  S CNT=CNT +1,^XTMP(" OR3P453"," LAST_REC_P ROCESSED") =ORIEN_U_C NT
  854            .  I '(CNT#5 0000) D  I  STOP Q
  855            . . F CNT2=1 :1:3600 H  1 S STOP=$ $REQ2STOP( ) I STOP Q
  856            .  S STOP=$$ REQ2STOP()  I STOP Q
  857            I  STOP Q
  858            S  XTMPMSG=" Creation o f 'EPRACDT ' X-Ref Co mpleted."
  859            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=XTMPMS G
  860            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=" "
  861            S  ^XTMP("OR 3P453","FI NISH")=$H
  862            S  XTMPMSG=" Background  Task Fini shed "
  863            S  XTMPMSG=X TMPMSG_$$H TE^XLFDT(^ XTMP("OR3P 453","FINI SH"))_"."
  864            S  XTMPCNT=X TMPCNT+1,^ XTMP("OR3P 453",XTMPC NT)=XTMPMS G
  865            ;
  866            ;  Send Mail  to instal ler to not ify of com pletion
  867            S  XMSUB="OR *3.0*453 p ost instal l has run  to complet ion."
  868            S  XMDUZ="Pa tch OR*3.0 *453"
  869            S  XTMPCNT=0
  870   XRFLOOP  S  XTMPCNT=$ O(^XTMP("O R3P453",XT MPCNT)) G: XTMPCNT'?1 N.N FIN
  871            S  ^TMP($J," OR3P453",X TMPCNT,0)= ^XTMP("OR3 P453",XTMP CNT)
  872            G  XRFLOOP
  873            ;
  874   FIN      S  XMTEXT="^ TMP($J,""O R3P453"","
  875            S  XMY(DUZ)= "" D ^XMD  K ^TMP($J, "OR3P453")  S ZTREQ=" @"
  876            K  XMDUZ,XMS UB,XMTEXT, XMY
  877            Q
  878            ;
  879   REQ2STOP()  ;
  880            ;  Check for  task stop  request
  881            ;  Returns 1  if stop r equest mad e.
  882            N  STATUS,X
  883            S  STATUS=0
  884            I  '$D(ZTQUE UED) Q 0
  885            S  X=$$S^%ZT LOAD()
  886            I  X D  ;
  887            .  S STATUS= 1
  888            .  S X=$$S^% ZTLOAD("Re ceived shu tdown requ est")
  889            ;
  890            I  STATUS S  ^XTMP("OR3 P453","STO PPED")=$H
  891            Q  STATUS
  892            ;
  893   CHECK    ;  Check the  Status of  the Task  by looking  at XTMP i nformation
  894            S  U="^" N P CNT,RECTOT AL
  895            I  '$D(^XTMP ("OR3P453" )) D  Q
  896            .  D MES^XPD UTL("Task  to Create  'EPRACDT'  has either  not start ed or has" )
  897            .  D MES^XPD UTL("autom atically p urged from  the syste m.")
  898            .  D MES^XPD UTL("")
  899            I  $D(^XTMP( "OR3P453", "START"))  D
  900            .  D MES^XPD UTL("Task  to Create  'EPRACDT'  Begun "_$$ HTE^XLFDT( ^XTMP("OR3 P453","STA RT"))_".")
  901            .  D MES^XPD UTL("")
  902            I  $D(^XTMP( "OR3P453", "FINISH"))  D  Q
  903            .  D MES^XPD UTL("...an d Complete d "_$$HTE^ XLFDT(^XTM P("OR3P453 ","FINISH" ))_".")
  904            .  D MES^XPD UTL("")
  905            I  $D(^XTMP( "OR3P453", "STOPPED") ) D
  906            .  D MES^XPD UTL("...an d Stopped  "_$$HTE^XL FDT(^XTMP( "OR3P453", "STOPPED") )_".")
  907            .  D MES^XPD UTL("")
  908            S  CNT=$P($G (^XTMP("OR 3P453","LA ST_REC_PRO CESSED")), U,2)
  909            I  +$G(CNT)' >0 Q
  910            S  RECTOTAL= $G(^XTMP(" OR3P453"," RECTOTAL") )
  911            S  PCNT=$P(( (CNT/RECTO TAL)*100), ".",1)
  912            D  MES^XPDUT L("...Curr ently, "_P CNT_"% of  Records ha ve been Pr ocessed.")
  913            D  MES^XPDUT L("")
  914            Q
  915            ;
  916  
  917   ORB3 Routi ne
  918   Routines
  919   Activities
  920   Routine Na me
  921   ORB3
  922   Enhancemen t Category
  923    New
  924    Modify
  925    Delete
  926    No Change
  927   RTM
  928  
  929   Related Op tions
  930   N/A
  931  
  932   Related Ro utines
  933   Routines “ Called By”
  934   Routines “ Called”   
  935  
  936   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
  937   DGCV, ORB3 1, ORB3FN,  ORB3REG,  ORB3SPEC,  ORBSMART,  ORQOR2, OR QPTQ1, SCA PMC, SCMCM HTC, SDUTL 3, VADPT,  XLFDT, XLF STR, XPAR,  XQALBUTL,  XQALERT, 
  938  
  939   Routines
  940   Activities
  941   Data Dicti onary (DD)  Reference s
  942   ^OR(100,   ^ORD(100.9
  943   Related Pr otocols
  944   N/A
  945   Related In tegration  Control Re gistration s (ICRs)
  946   1362
  947   Data Passi ng
  948    Input
  949    Output Re ference
  950    Both
  951    Global Re ference
  952    Local
  953   Input Attr ibute Name  and Defin ition
  954   Name:  ORN
  955   Definition : IEN into  OE/RR NOT IFICATIONS  file (#10 0.9)
  956   Name: ORBD FN
  957   Definition : IEN into  PATIENT f ile (#2)
  958   Name: ORNU M
  959   Definition : IEN into  ORDER fil e (#100)
  960   Name: ORBA DUZ
  961   Definition : Array of  Recipient  DUZs.
  962   Name: ORBP MSG
  963   Definition : Message  Text
  964   Name: ORBP DATA
  965   Definition : Identifi es the pac kage the N otificatio n is based  on.
  966   Output Att ribute Nam e and Defi nition
  967   Name:
  968   Definition :
  969  
  970   Current Lo gic
  971   USER     ; should USE R (ORBDUZ)  be a reci p
  972            D  USER^ORB3 USER(.XQA, ORBDUZ,ORN ,.ORBU,.OR BUI,ORBDFN ,+$G(ORNUM ))
  973            I  $D(ORFORC E(ORBDUZ))  S XQA(ORB DUZ)=""
  974            Q
  975  
  976   Modified L ogic (Chan ges are in  bold)
  977   USER     ; should USE R (ORBDUZ)  be a reci p
  978            ;  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)
  979            ;                    Th en check i f that Use r can rece ive Alerts
  980            N  ORTRDAT,O RTRNUM,ORT RREC,ORTRR EC2 I +$G( ORNUM)>0 D
  981            .  S ORTRDAT =$O(^OR(10 0,ORNUM,11 ,"B",$$NOW ^XLFDT()), -1) I +ORT RDAT>0 D
  982            . . S ORTRNU M=$O(^OR(1 00,ORNUM,1 1,"B",ORTR DAT,""),-1 ) I +ORTRN UM>0 D
  983            . .. S ORTRR EC2=$G(^OR (100,ORNUM ,11,ORTRNU M,0)) I OR TRREC2]""  D
  984            . ... S:ORTR NUM=1 ORTR REC=ORTRRE C2
  985            . ... S:ORTR NUM'=1 ORT RREC=$G(^O R(100,ORNU M,11,1,0))
  986            . ... I $P(O RTRREC,U,2 )=ORBDUZ,$ P(ORTRREC2 ,U,3) S OR BDUZ=$P(OR TRREC2,U,3 )
  987            D  USER^ORB3 USER(.XQA, ORBDUZ,ORN ,.ORBU,.OR BUI,ORBDFN ,+$G(ORNUM ))
  988            I  $D(ORFORC E(ORBDUZ))  S XQA(ORB DUZ)=""
  989            Q
  990  
  991   ORCSAVE Ro utine
  992  
  993   Routines
  994   Activities
  995   Routine Na me
  996   ORCSAVE
  997   Enhancemen t Category
  998    New
  999    Modify
  1000    Delete
  1001    No Change
  1002   RTM
  1003  
  1004   Related Op tions
  1005   N/A
  1006  
  1007   Related Ro utines
  1008   Routines “ Called By”
  1009   Routines “ Called”   
  1010  
  1011   OR3C100,
  1012   ORCACT2, O RCACT4,
  1013   ORCDFH, OR CDFHO,
  1014   ORCDFHTF,  ORCDLG,
  1015   ORCMED, OR CONV3,
  1016   ORCSEND, O RCSEND2,
  1017   ORCSEND3,  ORMBLDSD,  ORMEVNT1,
  1018   ORMFH, ORM FH1,
  1019   ORMGMRC, O RMLR,
  1020   ORMLR1, OR MPS,
  1021   ORMPS2, OR MPS3,
  1022   ORMRA, ORM SD, ORMVBE C,
  1023   ORWD, ORWD FH,
  1024   ORWDX, ORW DXA,
  1025   ORWDXM, OR WDXR,
  1026   VEJDVGR1
  1027   DIC, DIQ,  HMPOR, ORC D, ORCSAVE 1, ORMBLDO R, OROCAPI 1, ORWDPS1 , XLFDT
  1028  
  1029   Routines
  1030   Activities
  1031   Data Dicti onary (DD)  Reference s
  1032   ^DD(100, ^ DIC(9.4, ^ OR(100,  ^ ORD(100.02 , ^ORD(100 .05, ^ORD( 100.7, ^OR D(101.41
  1033   Related Pr otocols
  1034   N/A
  1035   Related In tegration  Control Re gistration s (ICRs)
  1036   N/A
  1037   Data Passi ng
  1038    Input
  1039    Output Re ference
  1040    Both
  1041    Global Re ference
  1042    Local
  1043   Input Attr ibute Name  and Defin ition
  1044   Name: ORDI ALOG
  1045   Definition : Array of  Dialog Va lues
  1046   Name: ORDG
  1047   Definition : Display  Group
  1048   Name: ORPK G
  1049   Definition : Package
  1050   Name: ORCA T
  1051   Definition :  Patient  Class
  1052   Name: OREV ENT
  1053   Definition :  OE/RR P atient Eve nt
  1054   Name: ORDU Z
  1055   Definition : Who Ente red Order
  1056   Name: ORLO G
  1057   Definition : When Ord er Entered
  1058   Name: CODE
  1059   Definition : Action C ode
  1060   Name: DA
  1061   Definition : IEN of O RDER file  (#100)
  1062   Name: PROV
  1063   Definition :  Action  Provider
  1064   Name: REAS ON
  1065   Definition : Reason f or Action
  1066   Name: WHEN
  1067   Definition : When Act ion Perfor med
  1068   Name: WHO
  1069   Definition : Who Perf ormed Acti on
  1070   Name: DLG
  1071   Definition : Order Di alog
  1072   Output Att ribute Nam e and Defi nition
  1073   Name: ORIF N
  1074   Definition :  Order N umber
  1075   Name: NEXT
  1076   Definition : Next Act ion Number
  1077   Name: ORPI FN
  1078   Definition : IFN of N ew Parent  Order
  1079  
  1080   Current Lo gic
  1081   EN1, ACTIO N & SET Ta gs affecte d:
  1082  
  1083   EN1      S  ^OR(100,O RIFN,0)=OR IFN_U_ORVP _U_U_$G(OR NP)_U_+ORD IALOG_";OR D(101.41,^
  1084   "_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)
  1085            S  ^OR(100,O RIFN,3)=LO G_"^90^"_S TS_U_$S($G (ORIT):ORI T_";ORD(10 1.41,",1:"
  1086   ")_U_$G(OR DIALOG("PR EV"))_"^^1 ^^^^"_TYPE
  1087            S  ^OR(100,O RIFN,8,0)= "^100.008D A^1^1",^OR (100,ORIFN ,8,1,0)=LO G_"^NW^"_$
  1088   G(ORNP)_U_ $S(SIGNREQ D:2,1:3)_" ^^^^^^^^"_ NATR_U_USR _"^1^"_STS ,^OR(100,O RIFN,8,"C"
  1089   ,"NW",1)=" "
  1090            S  ^OR(100," AF",LOG,OR IFN,1)=""
  1091  
  1092   ACTION(COD E,DA,PROV, REASON,WHE N,WHO) ; - - save new  action
  1093            N  NEXT,TOTA L,HDR,LAST ,X,PAT,DGR P,SIG,NATR ,TXT S DA= +DA
  1094            Q :'$D(^OR(1 00,DA,0))  0 Q:$G(COD E)'?2U 0
  1095            S :'$G(WHEN)  WHEN=+$E( $$NOW^XLFD T,1,12) S: '$G(WHO) W HO=DUZ
  1096            S  NATR=+$O( ^ORD(100.0 2,"C","E", 0)) ;assum e Elec Ent ered until  changed
  1097            S  PAT=$P(^O R(100,DA,0 ),U,2),DGR P=$P(^(0), U,11),SIG= $P(^(0),U, 16),X=+$P(
  1098   $G(^(3)),U ,7),HDR=$G (^(8,0))
  1099            S :X'>0 X=1  S TXT=$P($ G(^OR(100, DA,8,X,0)) ,U,14) ;cu rrent actn 's txt ptr
  1100            S :HDR="" HD R="^100.00 8DA^^" S T OTAL=+$P(H DR,U,4)
  1101            S  LAST=$O(^ OR(100,DA, 8,"C",CODE ,"?"),-1)  I LAST D
  1102            .  S X=$G(^O R(100,DA,8 ,LAST,0))  Q:$P(X,U,1 5)'=11  Q: $P(X,U,4)' =2
  1103            .  S NEXT=LA ST I PAT,$ P(X,U) D   ; kill old  xref entr ies
  1104            .  . K:DGRP  ^OR(100,"A CT",PAT,(9 999999-$P( X,U)),DGRP ,DA,NEXT)
  1105            .  . K ^OR(1 00,"AC",PA T,(9999999 -$P(X,U)), DA,NEXT),^ OR(100,"AS ",PAT,(999
  1106   9999-$P(X, U)),DA,NEX T),^OR(100 ,"AF",$P(X ,U),DA,NEX T)
  1107            S :'$G(NEXT)  NEXT=$O(^ OR(100,DA, 8,"?"),-1) +1,TOTAL=T OTAL+1
  1108            S  ^OR(100,D A,8,NEXT,0 )=WHEN_U_C ODE_U_$G(P ROV)_U_$S( SIG:2,1:3) _"^^^^^^^^
  1109   "_NATR_U_W HO_U_TXT_" ^11",^OR(1 00,DA,8,"C ",CODE,NEX T)=""
  1110            S  ^OR(100," AF",WHEN,D A,NEXT)=""
  1111  
  1112   SET(DLG) ;  -- Create  new paren t for orde r set ORDI ALOG
  1113            ;  Returns O RPIFN = if n of new p arent orde r for set
  1114            ;
  1115            Q :'$G(ORVP)   Q:'$G(DL G)  N OR0, PKG,NOW,CA TG,STS,ORL OC,TRSPEC, X
  1116            S  OR0=$G(^O RD(101.41, DLG,0)) Q: OR0=""  S  ORPIFN=$$N EXTIFN Q:' ORPIFN
  1117            S  PKG=$O(^D IC(9.4,"C" ,"OR",0)), CATG=$S($$ INPT^ORCD: "I",1:"O") ,STS=$S($G
  1118   (OREVENT): 10,1:11),N OW=$S($G(O RSLOG):ORS LOG,1:+$E( $$NOW^XLFD T,1,12))
  1119            I  $G(OREVEN T) S ORLOC ="",TRSPEC =""
  1120            S  ^OR(100,O RPIFN,0)=O RPIFN_U_OR VP_U_U_$G( ORNP)_U_DL G_";ORD(10 1.41,^"_DU
  1121   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)
  1122            S  ^OR(100,O RPIFN,8,0) ="^100.008 DA^1^1",^( 1,0)=NOW_" ^NW^"_$G(O RNP)_"^^^^
  1123   ^^^^^^"_DU Z_"^^"_STS ,^OR(100,O RPIFN,8,"C ","NW",1)= "",^OR(100 ,"AF",NOW, ORPIFN,1)= ""
  1124  
  1125   Modified L ogic (Chan ges are in  bold)
  1126   EN1, ACTIO N & SET Ta gs affecte d:
  1127  
  1128   EN1      S  ^OR(100,O RIFN,0)=OR IFN_U_ORVP _U_U_$G(OR NP)_U_+ORD IALOG_";OR D(101.41,^
  1129   "_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
  1130   (ORAPPT)
  1131            S  ^OR(100,O RIFN,3)=LO G_"^90^"_S TS_U_$S($G (ORIT):ORI T_";ORD(10 1.41,",1:"
  1132   ")_U_$G(OR DIALOG("PR EV"))_"^^1 ^^^^"_TYPE
  1133            S  ^OR(100,O RIFN,8,0)= "^100.008D A^1^1",^OR (100,ORIFN ,8,1,0)=LO G_"^NW^"_$
  1134   G(ORNP)_U_ $S(SIGNREQ D:2,1:3)_" ^^^^^^^^"_ NATR_U_USR _"^1^"_STS ,^OR(100,O RIFN,8,"C" ,"NW",1)=" "
  1135            S  ^OR(100," AF",LOG,OR IFN,1)=""
  1136            ;  RBD OR*3. 0*453 Add  setting of  EPRACDT i ndex expli citly
  1137            I  $G(ORNP)] "" S ^OR(1 00,"EPRACD T",ORNP,LO G,ORIFN,1) =""
  1138  
  1139   ACTION(COD E,DA,PROV, REASON,WHE N,WHO) ; - - save new  action
  1140            N  NEXT,TOTA L,HDR,LAST ,X,PAT,DGR P,SIG,NATR ,TXT S DA= +DA
  1141            Q :'$D(^OR(1 00,DA,0))  0 Q:$G(COD E)'?2U 0
  1142            S :'$G(WHEN)  WHEN=+$E( $$NOW^XLFD T,1,12) S: '$G(WHO) W HO=DUZ
  1143            S  NATR=+$O( ^ORD(100.0 2,"C","E", 0)) ;assum e Elec Ent ered until  changed
  1144            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))
  1145            S :X'>0 X=1  S TXT=$P($ G(^OR(100, DA,8,X,0)) ,U,14) ;cu rrent actn 's txt ptr
  1146            S :HDR="" HD R="^100.00 8DA^^" S T OTAL=+$P(H DR,U,4)
  1147            S  LAST=$O(^ OR(100,DA, 8,"C",CODE ,"?"),-1)  I LAST D
  1148            .  S X=$G(^O R(100,DA,8 ,LAST,0))  Q:$P(X,U,1 5)'=11  Q: $P(X,U,4)' =2
  1149            .  S NEXT=LA ST I PAT,$ P(X,U) D   ; kill old  xref entr ies
  1150            .  . K:DGRP  ^OR(100,"A CT",PAT,(9 999999-$P( X,U)),DGRP ,DA,NEXT)
  1151            .  . K ^OR(1 00,"AC",PA T,(9999999 -$P(X,U)), DA,NEXT),^ OR(100,"AS ",PAT,(999
  1152   9999-$P(X, U)),DA,NEX T),^OR(100 ,"AF",$P(X ,U),DA,NEX T)
  1153            .  . I $P(X, U,3) K ^OR (100,"EPRA CDT",$P(X, U,3),$P(X, U),DA,NEXT )   ; RBD 
  1154   OR*3.0*453  Handle Ki ll of EPRA CDT index  as AF inde x is done
  1155            S :'$G(NEXT)  NEXT=$O(^ OR(100,DA, 8,"?"),-1) +1,TOTAL=T OTAL+1
  1156            S  ^OR(100,D A,8,NEXT,0 )=WHEN_U_C ODE_U_$G(P ROV)_U_$S( SIG:2,1:3) _"^^^^^^^^
  1157   "_NATR_U_W HO_U_TXT_" ^11",^OR(1 00,DA,8,"C ",CODE,NEX T)=""
  1158            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
  1159  
  1160   SET(DLG) ;  -- Create  new paren t for orde r set ORDI ALOG
  1161            ;  Returns O RPIFN = if n of new p arent orde r for set
  1162            ;
  1163            Q :'$G(ORVP)   Q:'$G(DL G)  N OR0, PKG,NOW,CA TG,STS,ORL OC,TRSPEC, X
  1164            S  OR0=$G(^O RD(101.41, DLG,0)) Q: OR0=""  S  ORPIFN=$$N EXTIFN Q:' ORPIFN
  1165            S  PKG=$O(^D IC(9.4,"C" ,"OR",0)), CATG=$S($$ INPT^ORCD: "I",1:"O") ,STS=$S($G
  1166   (OREVENT): 10,1:11),N OW=$S($G(O RSLOG):ORS LOG,1:+$E( $$NOW^XLFD T,1,12))
  1167            I  $G(OREVEN T) S ORLOC ="",TRSPEC =""
  1168            S  ^OR(100,O RPIFN,0)=O RPIFN_U_OR VP_U_U_$G( ORNP)_U_DL G_";ORD(10 1.41,^"_DU
  1169   Z_U_NOW_U_ U_U_ORLOC_ U_U_CATG_U _TRSPEC_U_ PKG_"^^^"_ $G(OREVENT ),^(3)=NOW _"^90^"_ST
  1170   S_U_$S($G( ORIT):ORIT _"ORD(101. 41,",1:"") _"^^^1^^^^ 0^^"_+$P(O R0,U,6)
  1171            S  ^OR(100,O RPIFN,8,0) ="^100.008 DA^1^1",^( 1,0)=NOW_" ^NW^"_$G(O RNP)_"^^^^
  1172   ^^^^^^"_DU Z_"^^"_STS ,^OR(100,O RPIFN,8,"C ","NW",1)= "",^OR(100 ,"AF",NOW, ORPIFN,1)= ""
  1173            I  $G(ORNP)] "" S ^OR(1 00,"EPRACD T",ORNP,NO W,ORPIFN,1 )=""   ; R BD OR*3.0*
  1174   453 Set ne w EPRACDT  index expl icitly as  AF index i s done
  1175  
  1176   ORELR5 Rou tine
  1177   Routines
  1178   Activities
  1179   Routine Na me
  1180   ORELR5
  1181   Enhancemen t Category
  1182    New
  1183    Modify
  1184    Delete
  1185    No Change
  1186   RTM
  1187  
  1188   Related Op tions
  1189   Check Lab  orders fro m file 69  to 100 [OR E LAB ORDE RS CHECK 6 9=>100]
  1190  
  1191   Related Ro utines
  1192   Routines “ Called By”
  1193   Routines “ Called”   
  1194  
  1195   ORELR
  1196   DICN, ORCS AVE2, ORDD 100, ORU,  ORUTL1, OR X, XLFDT
  1197  
  1198   Routines
  1199   Activities
  1200   Data Dicti onary (DD)  Reference s
  1201   ^DD(100, ^ LAB(60, ^L R, ^LRO(69 , ^OR(100,  
  1202   Related Pr otocols
  1203   N/A
  1204   Related In tegration  Control Re gistration s (ICRs)
  1205   N/A
  1206   Data Passi ng
  1207    Input
  1208    Output Re ference
  1209    Both
  1210    Global Re ference
  1211    Local
  1212   Input Attr ibute Name  and Defin ition
  1213   Name: LRDF N
  1214   Definition : IEN into  PATIENT f ile (#2)
  1215   Name: ORAF IX
  1216   Definition : Flag to  Fix Databa se or not
  1217   Output Att ribute Nam e and Defi nition
  1218   Name:
  1219   Definition :
  1220  
  1221   Current Lo gic
  1222   LOOP(LRDFN ,ORAFIX) ; Loop on pa tient
  1223            I  '$D(^LR(L RDFN,0)) D  WRT(,,,"N o entry in  ^LR("_LRD FN,ORAFIX)  S DCNT=DC
  1224   NT+1,TOTCN T=TOTCNT+1  K:ORAFIX  ^LRO(69,"D ",LRDFN) Q
  1225            Q :$P(^LR(LR DFN,0),"^" ,2)'=2  ;N ot in pati ent file.
  1226            S  DFN=$P(^L R(LRDFN,0) ,"^",3)
  1227            Q :'$D(^LRO( 69,"D",$G( LRDFN)))
  1228            N  LRODT,LRS N,LRTI,LRT ST,LRENT,X ,X0,X3,ORX 1,ORX2,ORI FN,X8O
  1229            S  LRODT=0 F   S LRODT= $O(^LRO(69 ,"D",LRDFN ,LRODT)) Q :'LRODT  S  LRSN=0 F 
  1230    S LRSN=$O (^LRO(69," D",LRDFN,L RODT,LRSN) ) Q:'LRSN   D
  1231            .  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
  1232            .  S X=^LRO( 69,LRODT,1 ,LRSN,0),L RENT=$P(X, "^",5)
  1233            .  S LRTI=0  F  S LRTI= $O(^LRO(69 ,LRODT,1,L RSN,2,LRTI )) Q:LRTI< 1  S X0=^( LRTI,0) D
  1234            . . S LRTST= +X0,ORIFN= $P(X0,"^", 7)
  1235            . . I ORIFN  D
  1236            . .. I '$D(^ OR(100,ORI FN)) D WRT (LRODT,LRS N,LRTI,"Br oken point er to 100:
  1237   "_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
  1238            . .. S X=^OR (100,ORIFN ,0),X3=$G( ^(3))
  1239            . .. I DFN'= +$P(X,"^", 2) D WRT(L RODT,LRSN, LRTI,"Pati ent mismat ch:"_ORIFN
  1240   _"<"_$P(X3 ,"^",3)_"> ") S PTCNT =PTCNT+1,T OTCNT=TOTC NT+1 Q
  1241            . .. D STATU S(LRODT,LR SN,LRTI,X0 ,ORAFIX)
  1242            . .. I LRENT ,$P(X,"^", 7)>$S($P($ P(X,"^",8) ,".",2):$P (X,"^",8), 1:$P(X,"^" ,8)_".2359 ") D
  1243            . ... S ORX1 =$$FMADD^X LFDT($P(X, "^",7),,,3 0),ORX2=$$ FMADD^XLFD T($P(X,"^"
  1244   ,7),,,-30)
  1245            . ... I LREN T<ORX2!(LR ENT>ORX1)  S ENTCNT=E NTCNT+1,TO TCNT=TOTCN T+1 I ORAF IX D
  1246            . .... S $P( ^OR(100,OR IFN,0),"^" ,7)=LRENT
  1247            . .... I $P( X,"^",7)=+ $G(^OR(100 ,ORIFN,8,1 ,0)) S X8O =$G(^(0))  D
  1248            . ..... N DI ,DIC,DIE,D A,DR,D0,DQ ,DISYS
  1249            . ..... I $P (X,"^",11)  K ^OR(100 ,"ACT",$P( X,"^",2),9 999999-+X8 O,$P(X,"^" ,11),ORIFN ,1)
  1250            . ..... K ^O R(100,"AC" ,$P(X,"^", 2),9999999 -+X8O,ORIF N,1),^OR(1 00,"AF",+X
  1251   8O,ORIFN,1 ),^OR(100, "AS",$P(X, "^",2),999 9999-(+X8O ),ORIFN,1)
  1252            . ..... I $P (X8O,"^",1 6)=+X8O K  ^OR(100,"A R",$P(X,"^ ",2),99999 99-(+X8O),
  1253   ORIFN,1) S  ^OR(100," AR",$P(X," ^",2),9999 999-LRENT, ORIFN,1)=" ",$P(^OR(1 00,ORIFN,8
  1254   ,1,0),"^", 16)=LRENT
  1255            . ..... S $P (^OR(100,O RIFN,8,1,0 ),"^")=LRE NT,^OR(100 ,"AF",LREN T,ORIFN,1) =""
  1256            . ..... D S1 ^ORDD100(O RIFN,1,"", LRENT),SET ^ORDD100(O RIFN,1),AC T1^ORDD100
  1257   A(ORIFN,1)
  1258            Q
  1259  
  1260   Modified L ogic (Chan ges are in  bold)
  1261   LOOP(LRDFN ,ORAFIX) ; Loop on pa tient
  1262            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
  1263            Q :$P(^LR(LR DFN,0),"^" ,2)'=2  ;N ot in pati ent file.
  1264            S  DFN=$P(^L R(LRDFN,0) ,"^",3)
  1265            Q :'$D(^LRO( 69,"D",$G( LRDFN)))
  1266            N  LRODT,LRS N,LRTI,LRT ST,LRENT,X ,X0,X3,ORX 1,ORX2,ORI FN,X8O
  1267            S  LRODT=0 F   S LRODT= $O(^LRO(69 ,"D",LRDFN ,LRODT)) Q :'LRODT  S  LRSN=0 F 
  1268    S LRSN=$O (^LRO(69," D",LRDFN,L RODT,LRSN) ) Q:'LRSN   D
  1269            .  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
  1270            .  S X=^LRO( 69,LRODT,1 ,LRSN,0),L RENT=$P(X, "^",5)
  1271            .  S LRTI=0  F  S LRTI= $O(^LRO(69 ,LRODT,1,L RSN,2,LRTI )) Q:LRTI< 1  S X0=^( LRTI,0) D
  1272            . . S LRTST= +X0,ORIFN= $P(X0,"^", 7)
  1273            . . I ORIFN  D
  1274            . .. 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
  1275            . .. S X=^OR (100,ORIFN ,0),X3=$G( ^(3))
  1276            . .. 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
  1277            . .. D STATU S(LRODT,LR SN,LRTI,X0 ,ORAFIX)
  1278            . .. I LRENT ,$P(X,"^", 7)>$S($P($ P(X,"^",8) ,".",2):$P (X,"^",8), 1:$P(X,"^" ,8)_".2359 ") D
  1279            . ... S ORX1 =$$FMADD^X LFDT($P(X, "^",7),,,3 0),ORX2=$$ FMADD^XLFD T($P(X,"^" ,7),,,-30)
  1280            . ... I LREN T<ORX2!(LR ENT>ORX1)  S ENTCNT=E NTCNT+1,TO TCNT=TOTCN T+1 I ORAF IX D
  1281            . .... S $P( ^OR(100,OR IFN,0),"^" ,7)=LRENT
  1282            . .... I $P( X,"^",7)=+ $G(^OR(100 ,ORIFN,8,1 ,0)) S X8O =$G(^(0))  D
  1283            . ..... N DI ,DIC,DIE,D A,DR,D0,DQ ,DISYS
  1284            . ..... I $P (X,"^",11)  K ^OR(100 ,"ACT",$P( X,"^",2),9 999999-+X8 O,$P(X,"^" ,11),ORIFN ,1)
  1285            . ..... K ^O R(100,"AC" ,$P(X,"^", 2),9999999 -+X8O,ORIF N,1),^OR(1 00,"AF",+X
  1286   8O,ORIFN,1 ),^OR(100, "AS",$P(X, "^",2),999 9999-(+X8O ),ORIFN,1)
  1287            . ..... 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
  1288            . ..... 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
  1289            . ..... S $P (^OR(100,O RIFN,8,1,0 ),"^")=LRE NT,^OR(100 ,"AF",LREN T,ORIFN,1) =""
  1290            . ..... 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
  1291            . ..... D S1 ^ORDD100(O RIFN,1,"", LRENT),SET ^ORDD100(O RIFN,1),AC T1^ORDD100 A(ORIFN,1)
  1292            Q
  1293  
  1294   ORQ2 Routi ne
  1295  
  1296   Routines
  1297   Activities
  1298   Routine Na me
  1299   ORQ2
  1300   Enhancemen t Category
  1301    New
  1302    Modify
  1303    Delete
  1304    No Change
  1305   RTM
  1306  
  1307   Related Op tions
  1308   N/A
  1309  
  1310   Related Ro utines
  1311   Routines “ Called By”
  1312   Routines “ Called”   
  1313  
  1314   ORCXPND2,  ORRCOR, OR WOR, SAVEW OR
  1315   DIQ, DIWP,  ICDEX, OR CD, ORCHEC K, ORHLESC , ORQ12, O RQ20, ORQ2 1, ORX8, V ADPT, XLFS TR, XPAR
  1316  
  1317   Routines
  1318   Activities
  1319   Data Dicti onary (DD)  Reference s
  1320   ^DIC(45.7,   ^GMR(123 , ^OR(100,  ^ORD(100. 01, ^ORD(1 01.41, ^SC
  1321   Related Pr otocols
  1322   N/A
  1323   Related In tegration  Control Re gistration s (ICRs)
  1324   4203
  1325   Data Passi ng
  1326    Input
  1327    Output Re ference
  1328    Both
  1329    Global Re ference
  1330    Local
  1331   Input Attr ibute Name  and Defin ition
  1332   Name: ORIF N
  1333   Definition : IEN into  ORDER fil e (#100)
  1334   Output Att ribute Nam e and Defi nition
  1335   Name: ORY
  1336   Definition : Array of  Order Det ail inform ation
  1337  
  1338   Current Lo gic
  1339   DETAIL(ORY ,ORIFN) ;  -- Returns  details o f order OR IFN in ORY (#)
  1340            N  X,X2,I,CN T,ORDIALOG ,OR0,OR3,O R6,SEQ,ITE M,PRMT,MUL T,FIRST,TI TLE,INST,D
  1341   IWL,DIWR,D IWF,ACTION ,VAIN,ORIG VIEW,ORNMS P,ORYT,ORC RACT
  1342            ;  p 471 add ed ORCACT  to use act ion if pas sed in
  1343            S  CNT=0,ORC RACT=+$P(O RIFN,";",2 ),ORIFN=+O RIFN,OR0=$ G(^OR(100, ORIFN,0)),
  1344   OR3=$G(^(3 )),OR6=$G( ^(6))
  1345            S  ORNMSP=$$ NMSP^ORCD( $P(OR0,U,1 4))
  1346            ;  p 471 if  no action,  default t o CURRENT  ACTION..or  if not $O (<The acti on subfile >, -1)
  1347            S :'ORCRACT  ORCRACT=$S (+$P(OR3,U ,7):+$P(OR 3,U,7),1:+ $O(^OR(100 ,ORIFN,8,"
  1348   :"),-1))
  1349            K  @ORY,ORYT  S ORIGVIE W=1 D TEXT ^ORQ12(.OR YT,+ORIFN_ ";"_ORCRAC T,80) ;Cur rTx
  1350            M  @ORY=ORYT  ;Move tex t to globa l
  1351            S  I=0 F CNT =1:1 S I=$ O(ORYT(I))  Q:I'>0  D :$D(IORVON ) SETVIDEO (I,1,$L(OR
  1352   YT(I)),IOR VON,IORVOF F)
  1353            S  CNT=CNT+1 ,@ORY@(CNT )="   " ;b lank
  1354   D1       I  $O(^OR(10 0,+ORIFN,2 ,0)) D
  1355            .  S CNT=CNT +1,@ORY@(C NT)="Sub O rders:"
  1356            .  D:$D(IOUO N) SETVIDE O(CNT,1,11 ,IOUON,IOU OFF)
  1357            .  N IFN S I FN=0
  1358            .  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)
  1359            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1360            I  $P(OR3,U, 9),$D(^OR( 100,+$P(OR 3,U,9),0))  D
  1361            .  S CNT=CNT +1,@ORY@(C NT)="Paren t Order:"
  1362            .  D:$D(IOUO N) SETVIDE O(CNT,1,12 ,IOUON,IOU OFF)
  1363            .  D SUB(+$P (OR3,U,9))
  1364            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1365            I  $P(OR3,U, 11)=1,$P(O R3,U,5) D   ;Changed  - show pre vious orde r
  1366            .  S CNT=CNT +1,@ORY@(C NT)="Previ ous Order: "
  1367            .  D:$D(IOUO N) SETVIDE O(CNT,1,15 ,IOUON,IOU OFF) ;prev  order ori ginal text
  1368            .  N ORZ,I,O RIGVIEW S  ORIGVIEW=2  D TEXT^OR Q12(.ORZ,+ $P(OR3,U,5 ),55)
  1369            .  S CNT=CNT +1,@ORY@(C NT)="      Order Text :        " _$G(ORZ(1) )
  1370            .  S I=1 F   S I=$O(ORZ (I)) Q:I'> 0  S CNT=C NT+1,@ORY@ (CNT)=$$RE PEAT^XLFST
  1371   R(" ",24)_ $G(ORZ(I))
  1372   D2       S  CNT=CNT+1 ,@ORY@(CNT )="Activit y:"
  1373            D :$D(IOUON)  SETVIDEO( CNT,1,9,IO UON,IOUOFF )
  1374            S  DIWL=1,DI WR=64,DIWF ="C64",ORI =0 K ^UTIL ITY($J,"W" )
  1375            F   S ORI=$O (^OR(100,O RIFN,8,ORI )) Q:ORI'> 0  S ACTIO N=$G(^(ORI ,0)) D ACT ^ORQ20
  1376  
  1377   Modified L ogic (Chan ges are in  bold)
  1378   DETAIL(ORY ,ORIFN) ;  -- Returns  details o f order OR IFN in ORY (#)
  1379            N  X,X2,I,CN T,ORDIALOG ,OR0,OR3,O R6,SEQ,ITE M,PRMT,MUL T,FIRST,TI TLE,INST,D
  1380   IWL,DIWR,D IWF,ACTION ,VAIN,ORIG VIEW,ORNMS P,ORYT,ORC RACT
  1381            N  ORTRANS    ; OR*3*45 3 rbd Var  needed for  ORDER TRA NSFERS log ic below
  1382            ;  p 471 add ed ORCACT  to use act ion if pas sed in
  1383            S  CNT=0,ORC RACT=+$P(O RIFN,";",2 ),ORIFN=+O RIFN,OR0=$ G(^OR(100, ORIFN,0)),
  1384   OR3=$G(^(3 )),OR6=$G( ^(6))
  1385            S  ORNMSP=$$ NMSP^ORCD( $P(OR0,U,1 4))
  1386            ;  p 471 if  no action,  default t o CURRENT  ACTION..or  if not $O (<The acti on subfile >, -1)
  1387            S :'ORCRACT  ORCRACT=$S (+$P(OR3,U ,7):+$P(OR 3,U,7),1:+ $O(^OR(100 ,ORIFN,8," :"),-1))
  1388            K  @ORY,ORYT  S ORIGVIE W=1 D TEXT ^ORQ12(.OR YT,+ORIFN_ ";"_ORCRAC T,80) ;Cur rTx
  1389            M  @ORY=ORYT  ;Move tex t to globa l
  1390            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)
  1391            S  CNT=CNT+1 ,@ORY@(CNT )="   " ;b lank
  1392   D1       I  $O(^OR(10 0,+ORIFN,2 ,0)) D
  1393            .  S CNT=CNT +1,@ORY@(C NT)="Sub O rders:"
  1394            .  D:$D(IOUO N) SETVIDE O(CNT,1,11 ,IOUON,IOU OFF)
  1395            .  N IFN S I FN=0
  1396            .  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)
  1397            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1398            I  $P(OR3,U, 9),$D(^OR( 100,+$P(OR 3,U,9),0))  D
  1399            .  S CNT=CNT +1,@ORY@(C NT)="Paren t Order:"
  1400            .  D:$D(IOUO N) SETVIDE O(CNT,1,12 ,IOUON,IOU OFF)
  1401            .  D SUB(+$P (OR3,U,9))
  1402            .  S CNT=CNT +1,@ORY@(C NT)="   "  ;blank
  1403            I  $P(OR3,U, 11)=1,$P(O R3,U,5) D   ;Changed  - show pre vious orde r
  1404            .  S CNT=CNT +1,@ORY@(C NT)="Previ ous Order: "
  1405            .  D:$D(IOUO N) SETVIDE O(CNT,1,15 ,IOUON,IOU OFF) ;prev  order ori ginal text
  1406            .  N ORZ,I,O RIGVIEW S  ORIGVIEW=2  D TEXT^OR Q12(.ORZ,+ $P(OR3,U,5 ),55)
  1407            .  S CNT=CNT +1,@ORY@(C NT)="      Order Text :        " _$G(ORZ(1) )
  1408            .  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))
  1409   D2       S  CNT=CNT+1 ,@ORY@(CNT )="Activit y:"
  1410            D :$D(IOUON)  SETVIDEO( CNT,1,9,IO UON,IOUOFF )
  1411            S  DIWL=1,DI WR=64,DIWF ="C64",ORI =0 K ^UTIL ITY($J,"W" )
  1412            F   S ORI=$O (^OR(100,O RIFN,8,ORI )) Q:ORI'> 0  S ACTIO N=$G(^(ORI ,0)) D ACT ^ORQ20
  1413            ;  RBD OR*3. 0*453 Add  ORDER TRAN SFERS info rmation
  1414            S  ORI=0 F   S ORI=$O(^ OR(100,ORI FN,11,ORI) ) Q:ORI'>0   D
  1415            .  I ORI=1 D
  1416            . . S CNT=CN T+1,@ORY@( CNT)="   " ,CNT=CNT+1 ,@ORY@(CNT )="Reassig nments (Tr ansfers):"
  1417            .  S ORTRANS =$G(^OR(10 0,ORIFN,11 ,ORI,0))
  1418            .  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))
  1419            .  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))
  1420            I  $D(^OR(10 0,ORIFN,11 )) S CNT=C NT+1,@ORY@ (CNT)="    "
  1421  
  1422   ORQ3 Routi ne
  1423   Routines
  1424   Activities
  1425   Routine Na me
  1426   ORQ3
  1427   Enhancemen t Category
  1428    New
  1429    Modify
  1430    Delete
  1431    No Change
  1432   RTM
  1433  
  1434   Related Op tions
  1435   N/A
  1436  
  1437   Related Ro utines
  1438   Routines “ Called By”
  1439   Routines “ Called”   
  1440  
  1441   Called by  CPRS GUI v ia RPC cal ls ORQ3 EN , ORQ3 XFE R, ORQ3 AU THUSR & OR Q3 CHKPATC H.
  1442   DICN, ORQO R2, VADPT,  XLFDT
  1443  
  1444   Routines
  1445   Activities
  1446   Data Dicti onary (DD)  Reference s
  1447   ^OR(100, ^ VA(200
  1448   Related Pr otocols
  1449   N/A
  1450   Related In tegration  Control Re gistration s (ICRs)
  1451   N/A
  1452   Data Passi ng
  1453    Input
  1454    Output Re ference
  1455    Both
  1456    Global Re ference
  1457    Local
  1458   Input Attr ibute Name  and Defin ition
  1459   Name: ORPR IEN
  1460   Definition : IEN into  NEW PERSO N file (#2 00)
  1461   Name: ORDT 1
  1462   Definition : Starting  Date to S earch From
  1463   Name: ORDT 2
  1464   Definition : Ending D ate to Sea rch To
  1465   Name: LST
  1466   Definition :  List of  Order IEN s, Transfe rred From  Provider,  Transferre d To Provi ders, User  Requestin g Transfer , and Date /Times of  Transfer
  1467   Name: ORPA TCH
  1468   Definition : String c ontaining  “OR*3.0*45 3” to make  sure this  patch is  installed.
  1469   Output Att ribute Nam e and Defi nition
  1470   Name: ORY
  1471   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).
  1472   Name:  RES ULTS
  1473   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.
  1474  
  1475   Current Lo gic
  1476   N/A
  1477  
  1478   Modified L ogic (Chan ges are in  bold)
  1479   ORQ3     ; SLC/RBD -  Provider R ole Change  APIs ;Mar  04, 2018@ 08:52
  1480            ; ;3.0;ORDER  ENTRY/RES ULTS REPOR TING;**453 **;Dec 17,  1997
  1481            ;
  1482            Q
  1483            ;
  1484   EN(ORY,ORP RIEN,ORDT1 ,ORDT2) ;  Get Qualif ying Order s for Prov ider
  1485            ;
  1486            ;  This RPC  allows ret rieval of  Patients a nd Orders  for which  the
  1487            ;  Provider  is the Ord ering Prov ider and t he Orders  are Signed
  1488            ;
  1489            ;  Input:
  1490            ;    ORY is  the name o f the retu rn array
  1491            ;    ORPRIEN  identifie s the IEN  of the Pro vider to r etrieve Or ders for
  1492            ;    ORDT1 i dentifies  the start  date to st art lookin g from
  1493            ;    ORDT2 i dentifies  the end da te to stop  looking o nce reache d
  1494            ;  Output:
  1495            ;    Global  ^TMP("ORPA TRTN",$J,n ) where n  represents  each reco rd found
  1496            ;                                      starti ng with re cord "1"
  1497            ;      Conta ins data f or Patient  Name ^ Pa tient IEN  ^ Order IE N ^
  1498            ;                             Orde r Status ^  Order Dat e
  1499            ;
  1500            N  CNT,DFN,O R0,ORIEN,O ROBJ,ORPRX FRD,ORPTNM ,ORSIGNED, ORTMPDT,OR XFERNM,VAD M
  1501            S :'$D(U) U= "^" K ^TMP ("ORPTINFO ",$J),^TMP ("ORPATRTN ",$J)
  1502            S  ORY=$NA(^ TMP("ORPAT RTN",$J))
  1503            ;  Loop thro ugh Provid ers that a re Orderin g Provider s for Orde rs that ha ve been Si gned
  1504            S  ORTMPDT=O RDT1,ORDT2 =ORDT2_".2 359"
  1505            F   S ORDT1= $O(^OR(100 ,"EPRACDT" ,ORPRIEN,O RDT1)) Q:O RDT1>ORDT2   Q:ORDT1= ""  D
  1506            .  S ORIEN=" " F  S ORI EN=$O(^OR( 100,"EPRAC DT",ORPRIE N,ORDT1,OR IEN)) Q:OR IEN=""  D
  1507            . . S OR0=$G (^OR(100,O RIEN,0)) Q :ORIEN'[""   Q:$$ORDE RER^ORQOR2 (ORIEN)'=O RPRIEN   ;  skip if n ot Ord. Pr v.
  1508            . . 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
  1509            . . ; if Old  Provider  already Tr ansferred,  skip
  1510            . . S ORPRXF RD=0,ORXFE RNM=0
  1511            . . F  S ORX FERNM=$O(^ OR(100,ORI EN,11,ORXF ERNM)) Q:O RXFERNM=""   Q:ORXFER NM'?1N.N   D
  1512            . .. I $P($G (^OR(100,O RIEN,11,OR XFERNM,0)) ,U,2)=ORPR IEN D
  1513            . ... S ORPR XFRD=1
  1514            . . Q:ORPRXF RD=1  S OR OBJ=$P(OR0 ,U,2) Q:OR OBJ'["DPT( "
  1515            . . S DFN=+O ROBJ D OER R^VADPT S  ORPTNM=$G( VADM(1)) Q :ORPTNM=""
  1516            . . S ^TMP(" ORPTINFO", $J,ORPTNM, DFN,ORIEN) =""
  1517            ;  Now order  through T ransferred  To Provid er index f or situati on where h e/she has
  1518            ;  to Transf er Order t o a third  Provider ( or fourth,  etc.) ...  only allo w last ent ry
  1519            ;  from ORDE R TRANSFER S multiple  to be use d though.
  1520            S  ORDT1=ORT MPDT
  1521            F   S ORDT1= $O(^OR(100 ,"EPRTRDT" ,ORPRIEN,O RDT1)) Q:O RDT1>ORDT2   Q:ORDT1= ""  D
  1522            .  S ORIEN=" " F  S ORI EN=$O(^OR( 100,"EPRTR DT",ORPRIE N,ORDT1,OR IEN)) Q:OR IEN=""  D
  1523            . . S ORXFER NM=$O(^OR( 100,ORIEN, 11,"B"),-1 ) Q:$P($G( ^OR(100,OR IEN,11,ORX FERNM,0)), U,3)’=
  1524   ORPRIEN
  1525            . . S OR0=$G (^OR(100,O RIEN,0)) Q :ORIEN'[""
  1526            . . S OROBJ= $P(OR0,U,2 ) Q:OROBJ' ["DPT("
  1527            . . S DFN=+O ROBJ D OER R^VADPT S  ORPTNM=$G( VADM(1)) Q :ORPTNM=""
  1528            . . S ^TMP(" ORPTINFO", $J,ORPTNM, DFN,ORIEN) =""
  1529            ;  Put in Pa tient Name , Patient  IEN, & Ord er IEN ord er to retu rn to GUI
  1530            S  CNT=0,ORP TNM="" F   S ORPTNM=$ O(^TMP("OR PTINFO",$J ,ORPTNM))  Q:ORPTNM=" "  D
  1531            .  S DFN=""  F  S DFN=$ O(^TMP("OR PTINFO",$J ,ORPTNM,DF N)) Q:DFN= ""  D
  1532            . . S ORIEN= "" F  S OR IEN=$O(^TM P("ORPTINF O",$J,ORPT NM,DFN,ORI EN)) Q:ORI EN=""  D
  1533            . .. S CNT=C NT+1
  1534            . .. S ^TMP( "ORPATRTN" ,$J,CNT)=O RPTNM_U_DF N_U_ORIEN_ U_$P($$STA TUS^ORQOR2
  1535   (ORIEN),U, 2)_U_$$FMT E^XLFDT($P ($G(^OR(10 0,ORIEN,0) ),U,7))
  1536            K  ^TMP("ORP TINFO",$J)
  1537            Q
  1538            ;
  1539   XFER(RESUL TS,LST) ;  Transfer O rders to N ew Provide rs
  1540            ;
  1541            ;  This RPC  allows the  Transferr ing from o ne Provide r to anoth er
  1542            ;  which wil l create a n entry in to each or der in a L ist into
  1543            ;  the ORDER  TRANSFERS  multiple
  1544            ;
  1545            ;  Input:
  1546            ;    LST(1.. n) where e ach entry  contains:
  1547            ;      ORIEN  identifie s the IEN  of the Ord er to crea te a
  1548            ;             Reassignm ent (Trans fer) for
  1549            ;      ORPRI EN1 identi fies the T ransferrin g From Pro vider
  1550            ;      ORPRI EN2 identi fies the T ransferrin g To Provi der
  1551            ;      ORUSE R identifi es the Use r requesti ng the Tra nsfer
  1552            ;      ORDTT M identifi es the Tra nsfer Date /Time
  1553            ;  Output:
  1554            ;    Global  ^TMP("OROR DRTN",$J,n ) where n  represents  each reco rd
  1555            ;                                      starti ng with re cord "1"
  1556            ;      Conta ins data f or Order I EN ^ Succe ss Flag
  1557            ;                             ^ Er ror Messag e if Unsuc cessful
  1558            ;         Wh ere Succes s Flag = 0  if Unsucc essful or  1 if Succe ssful
  1559            ;
  1560            N  CNT,DA,DI C,DIE,DR,O RDTTM,ORIE N,ORPRIEN1 ,ORPRIEN2, ORUSER,X,Y
  1561            S :'$D(U) U= "^" K ^TMP ("ORORDRTN ",$J)
  1562            S  RESULTS=$ NA(^TMP("O RORDRTN",$ J))
  1563            S  CNT=0 F   S CNT=$O(L ST(CNT)) Q :CNT=""  D
  1564            .  S ORIEN=$ P(LST(CNT) ,U,1),ORPR IEN1=$P(LS T(CNT),U,2 )
  1565            .  S ORPRIEN 2=$P(LST(C NT),U,3),O RUSER=$P(L ST(CNT),U, 4)
  1566            .  S ORDTTM= $P(LST(CNT ),U,5)
  1567            .  I ORIEN'] "" S ^TMP( "ORORDRTN" ,$J,CNT)=O RIEN_U_0_U _"Order IE N Blank" Q
  1568            .  I '$D(^OR (100,ORIEN )) D  Q
  1569            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Invalid O rder IEN"
  1570            .  I ORPRIEN 1']"" D  Q
  1571            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "From Prov ider IEN B lank"
  1572            .  I '$D(^VA (200,ORPRI EN1)) D  Q
  1573            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "From Prov ider IEN " _ORPRIEN1_ " Invalid"
  1574            .  I ORPRIEN 2']"" D  Q
  1575            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "To Provid er IEN Bla nk"
  1576            .  I '$D(^VA (200,ORPRI EN2)) D  Q
  1577            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "To Provid er IEN "_O RPRIEN2_"  Invalid"
  1578            .  I ORUSER' ]"" D  Q
  1579            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Transferr ing User I EN Blank"
  1580            .  I '$D(^VA (200,ORUSE R)) D  Q
  1581            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Transferr ing User I EN "_ORUSE R_" Invali d"
  1582            .  I ORDTTM' ?7N1"."1.6 N S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Invalid T ransfer Da te/Time" Q
  1583            .  I ORDTTM< $$NOW^XLFD T() D  Q
  1584            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Transfer  Date/Time  Cannot be  in the Pas t"
  1585            .  L +^OR(10 0,ORIEN):0  I '$T D   Q
  1586            . . S ^TMP(" ORORDRTN", $J,CNT)=OR IEN_U_0_U_ "Another u ser is edi ting this  Order."
  1587            .  S DIC="^O R(100,"_OR IEN_",11," ,DA(1)=ORI EN,DIC(0)= "L",X=ORDT TM
  1588            .  S DIC("DR ")=".02/// /"_ORPRIEN 1_";.03/// /"_ORPRIEN 2
  1589            .  S DIC("DR ")=DIC("DR ")_";.04// //"_ORUSER  D FILE^DI CN
  1590            .  I +Y<0 S  ^TMP("OROR DRTN",$J,C NT)=ORIEN_ U_0_U_"Sav e Unsucces sful" L -^ OR(100,ORI EN) Q
  1591            .  S ^TMP("O RORDRTN",$ J,CNT)=ORI EN_U_1 L - ^OR(100,OR IEN)
  1592            Q
  1593            ;
  1594   AUTHUSR(OR Y) ; Does  user have  permission  to access  Provider
  1595            ;  Utilities  (Provider  Role Chan ge)
  1596            S  ORY=0
  1597            I  $D(^XUSEC ("OR PU AC CESS",DUZ) ) S ORY=1
  1598            Q
  1599            ;
  1600   CHKPATCH(O RY,ORPATCH ) ; Checks  for KIDS  Patch inst all
  1601            ;  RPC: ORQ3  CHKPATCH
  1602            ;  Input:  O RPATCH - P atch Numbe r (i.e. OR *3.0*453)
  1603            ;  Output: R eturns "1^ Patch Is I nstalled"  on success ;
  1604            ;          o therwise r eturns "0^ Patch Is N ot Install ed"
  1605            N  ORX
  1606            S  ORX=$$PAT CH^XPDUTL( ORPATCH)
  1607            S  ORY=$S(OR X:"1^Patch  Is Instal led",1:"0^ Patch Is N ot Install ed")
  1608            Q
  1609            ;
  1610  
  1611   Remote Pro cedure Cal l (RPC)
  1612   RPCs
  1613   Activities
  1614   Name
  1615    'ORQ3 AUT HUSR' 
  1616   TAG^RTN
  1617   AUTHUSR^OR Q3
  1618   Input Para meters
  1619   None – CPR S will alr eady know  the DUZ of  the user  logged in  to it
  1620   Results Ar ray
  1621    Single Va lue
  1622    Array
  1623    Word Proc essing
  1624  
  1625    Global Ar ray
  1626    Global In stance
  1627  
  1628   Descriptio n
  1629   NSR2013050 4 – Provid er Role Ch ange 
  1630   Returns “1 ” if user  has the ne w SECURITY  KEY calle d OR PU AC CESS, othe rwise “0”
  1631  
  1632   RPCs
  1633   Activities
  1634   Name
  1635    'ORQ3 CHK PATCH' 
  1636   TAG^RTN
  1637   CHKPATCH^O RQ3
  1638   Input Para meters
  1639   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 .
  1640   Results Ar ray
  1641    Single Va lue
  1642    Array
  1643    Word Proc essing
  1644  
  1645    Global Ar ray
  1646    Global In stance
  1647  
  1648   Descriptio n
  1649   NSR2013050 4 – Provid er Role Ch ange 
  1650   Returns “1 ^Patch Is  Installed”  or “0^Pat ch Is Not  Installed”
  1651  
  1652  
  1653   RPCs
  1654   Activities
  1655   Name
  1656    'ORQ3 EN'  
  1657   TAG^RTN
  1658   EN^ORQ3
  1659   Input Para meters
  1660   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
  1661   Results Ar ray
  1662    Single Va lue
  1663    Array
  1664    Word Proc essing
  1665  
  1666    Global Ar ray
  1667    Global In stance
  1668  
  1669   Descriptio n
  1670   NSR2013050 4 – Provid er Role Ch ange 
  1671   Returns re sults in P atient Nam e, Patient  IEN, Orde r IEN sort  order wit h the foll owing 5 fi elds:
  1672   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
  1673  
  1674   RPCs
  1675   Activities
  1676   Name
  1677    'ORQ3 XFE R' 
  1678   TAG^RTN
  1679   XFER^ORQ3
  1680   Input Para meters
  1681   LST(1..n)  where each  entry con tains:
  1682   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
  1683   Results Ar ray
  1684    Single Va lue
  1685    Array
  1686    Word Proc essing
  1687  
  1688    Global Ar ray
  1689    Global In stance
  1690  
  1691   Descriptio n
  1692   NSR2013050 4 – Provid er Role Ch ange
  1693   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”
  1694  
  1695   Network De tailed Des ign 
  1696   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 .
  1697   Security a nd Privacy
  1698   Security
  1699   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).
  1700  
  1701   NAME: OR P U GUI                            MENU TEXT:  CPRS Prov ider Utili ties
  1702     TYPE: Br oker (Clie nt/Server)            CREATOR: D AVIS,ROBER T B
  1703    DESCRIPTI ON:   This  option is  required  by the Ker nel Broker  to give a ccess to
  1704    the RPCs  used by th e CPRS Pro vider Util ities.  
  1705     TIMESTAM P OF PRIMA RY MENU: 6 4509,48974
  1706   RPC: ORWU  DT
  1707   RPC: ORQOR  DETAIL
  1708   RPC: ORWU  NEWPERS
  1709   RPC: ORQ3  EN
  1710   RPC: ORQ3  XFER
  1711   RPC: ORWU  VERSRV
  1712   RPC: ORWU  USERINFO
  1713   RPC: ORQ3  AUTHUSR
  1714     UPPERCAS E MENU TEX T: CPRS PR OVIDER UTI LITIES
  1715  
  1716   Also, a ne w SECURITY  KEY has b een added  with its d efinition  below.
  1717  
  1718   NAME: OR P U ACCESS
  1719     DESCRIPT IVE NAME:  Provider U tilities A ccess
  1720    DESCRIPTI ON:   This  security  key will b e used to  control us er access  to the
  1721    Provider  Utilities  (Provider  Role Chang e) off the  Tools men u in CPRS.
  1722  
  1723   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.
  1724   Privacy
  1725   This proje ct will co ntinue to  use the ex isting Vis tA / CPRS  privacy mo del.  
  1726  
  1727   Service Or iented Arc hitecture  / ESS Deta iled Desig
  1728   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.
  1729   One note:  CPRS’s arc hitecture  does not s upply new  services o r consume  services.
  1730   External S ystem Inte rface Desi gn
  1731   This secti on documen ts the Pro vider Util ities Delp hi GUI app lication.
  1732   Interface  Architectu re 
  1733   Provider U tilities u ses existi ng CPRS ar chitecture , to inclu de the RPC  broker an d base 508  form.
  1734   GUI Securi ty
  1735   Access to  this GUI a pplication  is restri cted using  multiple  redundant  mechanisms  and check s.
  1736   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.
  1737   The applic ation will  not run w ithout 2FA  authentic ation.
  1738   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”.
  1739   Interface  Detailed D esign
  1740   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.
  1741    Human-Mac hine Inter face (GUI)
  1742   Interface  Design Rul es
  1743   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.
  1744   Inputs
  1745   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.
  1746   Outputs
  1747   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.
  1748   Delphi Des ign Notes
  1749   Compliance  with GUI  SAC, V1.0
  1750   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.
  1751   Windows Re gistry
  1752   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.
  1753   Action Lis ts
  1754   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.
  1755   Section 50 8-Complian t Form Inh eritance
  1756   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).
  1757   Windows He lp
  1758   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.
  1759  
  1760   Navigation  Hierarchy
  1761   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.
  1762  
  1763   Figure 1:  GUI Naviga tion Flow
  1764   Main Form:  “Provider  Utilities : Reassign  Patient O rders”
  1765   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 .
  1766  
  1767  
  1768   Figure 2:  Main Form
  1769  
  1770   Usage (opt imal progr am flow)
  1771   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 .
  1772   User opens  the appli cation and  the main  window app ears
  1773   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”.
  1774   User selec ts one or  more new p roviders b y clicking  the butto n “Add New  Provider” .
  1775   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.
  1776   User click s the butt on “Apply  Changes” t o review a nd execute  the order  reassignm ents.
  1777   User exits  the appli cation or  repeats th is process  for addit ional prov iders.
  1778   Specific f unctionali ty
  1779   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.
  1780  
  1781   The main w indow has  this speci fic GUI fu nctionalit y:
  1782  
  1783   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.
  1784   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.
  1785   Selection:  A context  (popup) m enu will s elect or d eselect al l current  patients.
  1786   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.
  1787   Informatio n: The mai n window a lways disp lays an up dated pati ent count  below the  current pa tients lis t.
  1788   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.
  1789   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.
  1790   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.
  1791   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.
  1792   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.
  1793   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).
  1794   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 .
  1795   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.
  1796   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.
  1797   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.
  1798   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 .
  1799   Behavior:  Inappropri ate action s (buttons , menu ite ms) are di sabled whe n appropri ate.
  1800   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.
  1801   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.
  1802   Modal Form : “Select  Current Pr ovider” 
  1803   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 .
  1804   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.
  1805  
  1806   Figure 3:  Select Cur rent Provi der
  1807   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.
  1808   Modal Form : Qualifyi ng Orders
  1809   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.
  1810   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.
  1811  
  1812   Figure 4:  Qualifying  Orders fo r Patient
  1813   Modal Form : Reassign  Orders (R eview and  Execute)
  1814   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.
  1815   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.
  1816  
  1817  
  1818   Figure 5:  Reassign O rders
  1819   Modal Form : About di alog
  1820   A standard  CPRS-styl e About di alog is di splayed fr om the Hel p menu.
  1821  
  1822   Figure 6:  About Dial og
  1823  
  1824    Attachmen t A – Appr oval Signa tures
  1825   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.
  1826   The Busine ss Sponsor  and Proje ct Manager  are requi red to sig n.
  1827  
  1828   __________ __________ __________ __________ __________ __________ __________ ________
  1829   Signed:Dat e: 
  1830   < Business  Sponsor >
  1831  
  1832   __________ __________ __________ __________ __________ __________ __________ ________
  1833   Signed:Dat e: 
  1834   < Project  Manager >
  1835  
  1836  
  1837   Additional  Informati on 
  1838   Attach any  addition  informatio n that sup plements t he design  specificat ion.
  1839   Identifica tion of Te chnology a nd Standar ds
  1840   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.).
  1841   Constraini ng Policie s, Directi ves and Pr ocedures
  1842   Identify a ny constra ints or re quirements  placed on  this docu ment by po licies, di rectives,  or procedu res.
  1843   Requiremen ts Traceab ility Matr ix
  1844   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.
  1845   Packaging  and Instal lation
  1846   Outline an y special  considerat ions for s oftware pa ckaging an d installa tion.
  1847   Design Met rics
  1848   Describe a ll metrics  to be use d during t he design  activity.
  1849  
  1850  
  1851   Template R evision Hi story
  1852   Date
  1853   Version
  1854   Descriptio n
  1855   Author
  1856   June 2015
  1857   2.10
  1858   Changed He ading 1 de fault sett ing to eli minate pag e break be fore
  1859   Process Ma nagement
  1860   May 2015
  1861   2.9
  1862   Edited for  Section 5 08 conform ance and r emediated  with Commo n Look Off ice tool
  1863   Process Ma nagement
  1864   February 2 015
  1865   2.8
  1866   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.
  1867   Andrew Sla wter, Offi ce of Tech nology Str ategies
  1868   September  2014
  1869   2.7
  1870   Adds Enter prise Shar ed Service s terms an d requires  AERB Comp liance Cer tificate a ttachment.
  1871   Process Ma nagement
  1872   August 201 4
  1873   2.6
  1874   Signature  block upda te authori zed by AER B  CR_0189 34
  1875   Process Ma nagement
  1876   March 2014
  1877   2.5
  1878   Section 50 8 repairs  to new ver sion appro ved by AER B Chair ap proved 
  1879   Process Ma nagement
  1880   August 201 3
  1881   2.3
  1882   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. 
  1883   ASD Enterp rise Share d Services  (ESS) Wor k Group
  1884   June 2013
  1885   1.3
  1886   Upgraded t o MS Offic e 2007-201 0 format 
  1887   Process Ma nagement
  1888   June 2013
  1889   1.2
  1890   Address in consistenc ies in Sec tion 3, Co nceptual D esign, Cor rect headi ngs 
  1891   Process Ma nagement
  1892   March 2013
  1893   1.1
  1894   Formatted  to documen tation sta ndards and  edited fo r Section  508 confor mance
  1895   Process Ma nagement
  1896   January 20 13
  1897   1.0
  1898   Initial Do cument
  1899   PMAS Busin ess Office
  1900  
  1901  
  1902   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