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

NUR22PST.m

Go to the documentation of this file.
NUR22PST ; HCIOFO/MD-Post-Init for Patch 22
 ;;4.0;NURSING SERVICE;**22**;Apr 25, 1997
 D BMES^XPDUTL("Removing duplicate problem entries from the Nurs Care Plan (#216.8) file....")
 K ^TMP($J) S NSW=0
 S NURDA=0 F  S NURDA=$O(^NURSC(216.8,NURDA)) Q:NURDA'>0  I $G(^NURSC(216.8,NURDA,0))'="" W:($E(IOST)="C"&$R(100)) "." D  K ^TMP($J) S NSW=0
 .  S NURD1=0 F  S NURD1=$O(^NURSC(216.8,NURDA,"PROB",NURD1)) Q:NURD1'>0  I '($G(^NURSC(216.8,NURDA,"PROB",NURD1,0))="") D
 .  .  S NURX=^NURSC(216.8,NURDA,"PROB",NURD1,0) I 'NSW D SETMP S NSW=1 Q
 .  .  I NSW,$D(^TMP($J,"NPREV",NURX)) D DUPROC Q
 .  .  D SETMP
 .  .  Q
 .  Q
QUIT K ^TMP($J),DA,DIK,NSW,NURDA,NURD1
 D BMES^XPDUTL("Done")
 Q
DUPROC ; PROCESS DUPLICATE
 ;
 S DA(1)=NURDA,DA=NURD1,DIK="^NURSC(216.8,DA(1),""PROB""," D ^DIK K DIK
 Q
SETMP ; SET TEMP GLOBAL
 S ^TMP($J,"NPREV",NURX)="" S:'$D(^NURSC(216.8,NURDA,"PROB","B",NURX,NURD1)) ^NURSC(216.8,NURDA,"PROB","B",NURX,NURD1)=""
 Q