Print Page as PDF
DBIA350 ICR (350)

DBIA350    ICR (350)

Name Value
NUMBER 350
IA # 350
FILE NUMBER 2
GLOBAL ROOT DPT(
DATE CREATED 1994/02/28
CUSTODIAL PACKAGE REGISTRATION
CUSTODIAL ISC Albany
USAGE Private
TYPE File
DBIC APPROVAL STATUS APPROVED
NAME DBIA350
ORIGINAL NUMBER 350
GENERAL DESCRIPTION
I.   Direct read access to the DPT global.

A.   ^DPT("SSN") -> Used to obtain a list of all patient SSN's
currently on file.  These SSN's are then compared to the
SSN's on the MPD CDROM to check for visits to other
hospitals.

B.   ^DPT(DFN) -> Used to verify that a patient is in the
file.

C.   ^DPT(DFN,"S",DATE,0) -> Used to verify that a clinic
appointment has not been canceled.

II.  The addition of a Mumps cross-reference to the SSN field for
the purpose of setting the SSN in the PPP NEW SSN file.  Any
new SSN's will be checked at night for visits to other
hospitals and then deleted from the PPP NEW SSN file.

We suggest the Mumps cross-reference be implemented as
follows:

SET ->  S PPP=X,X="PPPFMX" X ^%ZOSF("TEST") D:$T SNSSN^PPPFMX
S X=PPP K PPP
KILL -> S PPP=X,X="PPPFMX" X ^%ZOSF("TEST") D:$T KNSSN^PPPFMX
S X=PPP K PPP

The referenced routines are as follows:

SNSSN  ;
N PPPNOD0,PPPTR
N ZTRTN,ZTIO,ZTDTH,ZTDESC,ZTSAVE
;
; Check that this is either an edit or a new entry to avoid
;   setting during a re-index of the Patient file.
; PPPOK is defined in the kill logic below if the new entry
;   does not equal the old.
; DPTDFN is defined in the Patient Registration routines.
;
I ($D(PPPOK))!($D(DPTDFN)) D
.S PPPNOD0=$G(^PPP(1020.7,0))
.Q:PPPNOD0=""
.;
.; Get the File Descriptor Node for updating.
.;
.S PPPTR=$P(PPPNOD0,"^",4)
.;
.; Set the entry and the "B" Xref
.;
.S ^PPP(1020.7,DA,0)=X
.S ^PPP(1020.7,"B",X,DA)=""
.;
.; Update the Descriptor node.
.;
.S $P(PPPNOD0,"^",3)=DA
.S $P(PPPNOD0,"^",4)=PPPTR+1
.S ^PPP(1020.7,0)=PPPNOD0
.;
.; Task out the MPD lookup.
.;
.S ZTRTN="NEWSSN^PPPBLD5"
.S ZTIO=""
.S ZTDTH=$H
.S ZTDESC="NEW SSN/MPD ROUTINE"
.S ZTSAVE("PPPSSN")=PPP
.S ZTSAVE("PPPIFN")=DA
.D ^%ZTLOAD
;
K PPPOK
Q


KNSSN  ;
N PPPNOD0
;
; Check that this is an edit and not a re-index.
;
I X'=$P($G(^DPT(DA,0)),"^",9) D
.S PPPOK=1
.;
.; Check that the node currently exists, kill it if it does.
.;
.I $D(^PPP(1020.7,"B",PPP)) D
..K:$D(^PPP(1020.7,DA)) ^(DA)
..K:$D(^PPP(1020.7,"B",PPP,DA)) ^(DA)
..;
..; If the record count is alredy 0 then quit.
..;
..S PPPNOD0=^PPP(1020.7,0)
..Q:+$P(PPPNOD0,"^",4)=0
..S $P(PPPNOD0,"^",4)=$P(PPPNOD0,"^",4)-1
..S ^PPP(1020.7,0)=PPPNOD0
STATUS Active
DURATION Till Otherwise Agreed
ID DPT(
SUBSCRIBING PACKAGE
SUBSCRIBING PACKAGE ISC
PHARMACY PRESCRIPTION PRACTICE Albany