Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRCILKP

GMRCILKP.m

Go to the documentation of this file.
  1. GMRCILKP ;SLC/JFR - LOOK UP IFC BY REMOTE CONS #;15-Mar-2012 10:39;PLS
  1. ;;3.0;CONSULT/REQUEST TRACKING;**22,1001,1003**;DEC 27, 1997;Build 14
  1. ;Modified - IHS/CIA/MGH - 11/28/2005 - Line EN+38 - Modified to use hrcn instead of SSN
  1. EN ; start here
  1. N DIR,DIRUT,DIROUT,DTOUT,DUOUT,X,Y,GMRCSIT,GMRCO,DFN,GMRCREMC
  1. N VALMBCK,VALMCNT,GMRCA,GMRCDIF,GMRCDVL,GMRCLOC,GMRCWARD,GMRCX,GMRCDISP
  1. S DIR(0)="PO^4:EMQ"
  1. S DIR("S")="I $$STA^XUAF4(+Y)=+$$STA^XUAF4(+Y)"
  1. S DIR("A")="Choose the facility to which the remote entry belongs"
  1. D ^DIR
  1. I $D(DIRUT) Q
  1. S GMRCSIT=+Y
  1. K X,Y,DIR
  1. S DIR(0)="NO^1:9999999"
  1. S DIR("A")="Select the Remote Consult Entry #"
  1. D ^DIR
  1. I $D(DIRUT) Q
  1. S GMRCREMC=Y
  1. S GMRCO=$O(^GMR(123,"AIFC",GMRCSIT,GMRCREMC,0))
  1. I '$G(GMRCO) D G EN
  1. . W $C(7),!!
  1. . W "No Consult on file for the selected site with that remote number!"
  1. . W !!
  1. . K DIR
  1. . S DIR(0)="E" D ^DIR
  1. . W !,"Select again"
  1. S DFN=$P(^GMR(123,GMRCO,0),U,2)
  1. K DIR
  1. S DIR(0)="S^B:brief;D:detailed"
  1. S DIR("A")="Display type"
  1. S DIR("B")="B"
  1. D ^DIR
  1. I $D(DTOUT)!($D(DUOUT)) Q
  1. S GMRCDISP=Y
  1. I GMRCDISP="B" D G EN
  1. . N GMRCST,GMRCSS,GMRCPNM,GMRCSN
  1. . D DEM^GMRCU
  1. . S GMRCSN=$P(GMRCSN,"-",3)
  1. . S GMRCPNM=$E(GMRCPNM,1,23)
  1. . S GMRCST=$$GET1^DIQ(100.01,$P(^GMR(123,GMRCO,0),U,12),.1)
  1. . S GMRCSS=$E($$SVC^GMRCAU(GMRCO),1,22)
  1. . ;W !!,"Local cslt# To Service",?37,"Status Patient",?74,"SSN"
  1. . ;IHS/CIA/MGH Modified to use HRCN instead of SSN
  1. . W !!,"Local cslt# To Service",?37,"Status Patient",?74,"HRCN"
  1. . W !,$$REPEAT^XLFSTR("-",79)
  1. . ;W !,GMRCO,?14,GMRCSS,?39,GMRCST,?46,GMRCPNM,?74,GMRCSN,!!
  1. . W !,GMRCO,?14,GMRCSS,?39,GMRCST,?46,GMRCPNM,?74,GMRCHRCN,!!
  1. . K DIR S DIR(0)="E" D ^DIR
  1. . W !,"Select again"
  1. . D ^GMRCREXT
  1. I GMRCDISP="D" D G EN
  1. . D DT^GMRCSLM2(GMRCO)
  1. . I '$D(^TMP("GMRCR",$J,"DT")) W !,"Error finding details!" Q
  1. . M ^TMP("GMRCR",$J,"DTLIST")=^TMP("GMRCR",$J,"DT")
  1. . S VALMCNT=$O(^TMP("GMRCR",$J,"DTLIST"," "),-1)
  1. . D EN^VALM("GMRC DETAILED DISPLAY")
  1. . D ^GMRCREXT
  1. Q