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

BGP6DPE3.m

Go to the documentation of this file.
BGP6DPE3 ; IHS/CMI/LAB - patient ed report ;
 ;;16.1;IHS CLINICAL REPORTING;;MAR 22, 2016;Build 170
 ;
 ;
SET73 ;EP
 I BGPTIME=2 D SET73P Q
 I BGPTIME=3 D SET73B Q
 I '$D(^BGPPEDCM(BGPRPT,18,0)) S ^BGPPEDCM(BGPRPT,18,0)="^90556.1218A^0^0"
 S Z=$O(^BGPPEDCM(BGPRPT,18,"B",BGPT,0)) I Z D  Q
 .S $P(^BGPPEDCM(BGPRPT,18,Z,0),U,3)=$P(^BGPPEDCM(BGPRPT,18,Z,0),U,3)+BGPC
 S Z=$P(^BGPPEDCM(BGPRPT,18,0),U,3)+BGPC,$P(^BGPPEDCM(BGPRPT,18,0),U,3)=Z,$P(^BGPPEDCM(BGPRPT,18,0),U,4)=Z
 S ^BGPPEDCM(BGPRPT,18,Z,0)=BGPT_U_BGPT_U_BGPC
 S ^BGPPEDCM(BGPRPT,18,"B",BGPT,Z)=""
 Q
SET73P ;
 I '$D(^BGPPEDPM(BGPRPT,18,0)) S ^BGPPEDPM(BGPRPT,18,0)="^90556.1318A^0^0"
 S Z=$O(^BGPPEDPM(BGPRPT,18,"B",BGPT,0)) I Z D  Q
 .S $P(^BGPPEDPM(BGPRPT,18,Z,0),U,3)=$P(^BGPPEDPM(BGPRPT,18,Z,0),U,3)+1
 S Z=$P(^BGPPEDPM(BGPRPT,18,0),U,3)+1,$P(^BGPPEDPM(BGPRPT,18,0),U,3)=Z,$P(^BGPPEDPM(BGPRPT,18,0),U,4)=Z
 S ^BGPPEDPM(BGPRPT,18,Z,0)=BGPT_U_BGPT_U_1
 S ^BGPPEDPM(BGPRPT,18,"B",BGPT,Z)=""
 Q
SET73B ;
 I '$D(^BGPPEDBM(BGPRPT,18,0)) S ^BGPPEDBM(BGP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