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

BGP5DPE3.m

Go to the documentation of this file.
BGP5DPE3 ;IHS/CMI/LAB - patient ed report; 
 ;;15.1;IHS CLINICAL REPORTING;;MAY 06, 2015;Build 143
 ;
 ;
SET73 ;EP
 I BGPTIME=2 D SET73P Q
 I BGPTIME=3 D SET73B Q
 I '$D(^BGPPEDCK(BGPRPT,18,0)) S ^BGPPEDCK(BGPRPT,18,0)="^90554.1218A^0^0"
 S Z=$O(^BGPPEDCK(BGPRPT,18,"B",BGPT,0)) I Z D  Q
 .S $P(^BGPPEDCK(BGPRPT,18,Z,0),U,3)=$P(^BGPPEDCK(BGPRPT,18,Z,0),U,3)+BGPC
 S Z=$P(^BGPPEDCK(BGPRPT,18,0),U,3)+BGPC,$P(^BGPPEDCK(BGPRPT,18,0),U,3)=Z,$P(^BGPPEDCK(BGPRPT,18,0),U,4)=Z
 S ^BGPPEDCK(BGPRPT,18,Z,0)=BGPT_U_BGPT_U_BGPC
 S ^BGPPEDCK(BGPRPT,18,"B",BGPT,Z)=""
 Q
SET73P ;
 I '$D(^BGPPEDPK(BGPRPT,18,0)) S ^BGPPEDPK(BGPRPT,18,0)="^90554.1318A^0^0"
 S Z=$O(^BGPPEDPK(BGPRPT,18,"B",BGPT,0)) I Z D  Q
 .S $P(^BGPPEDPK(BGPRPT,18,Z,0),U,3)=$P(^BGPPEDPK(BGPRPT,18,Z,0),U,3)+1
 S Z=$P(^BGPPEDPK(BGPRPT,18,0),U,3)+1,$P(^BGPPEDPK(BGPRPT,18,0),U,3)=Z,$P(^BGPPEDPK(BGPRPT,18,0),U,4)=Z
 S ^BGPPEDPK(BGPRPT,18,Z,0)=BGPT_U_BGPT_U_1
 S ^BGPPEDPK(BGPRPT,18,"B",BGPT,Z)=""
 Q
SET73B ;
 I '$D(^BGPPEDBK(BGPRPT,18,0)) S ^BGPPEDBK(BGP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