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

BDMD9PS.m

Go to the documentation of this file.
BDMD9PS ; IHS/CMI/LAB - NO DESCRIPTION PROVIDED 28 Jan 2005 1:34 PM ;
 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
 ;
 ;
MAIN ;EP
 D DRUG,LAB,MENU  ;LAB,LOINC,MENU
 ;D ^BDM8X
 Q
 ;
DRUG ;EP set up drug taxonomies
 S ATXFLG=1
 S BDMX="DM AUDIT INCRETIN MIMETIC",BDMTAX="",BDMNDCT="" D DRUG1
 S BDMX="DM AUDIT DPP4 INHIBITOR DRUGS",BDMTAX="",BDMNDCT="" D DRUG1
 Q
DRUG1 ;
 S BDMTX=$O(^ATXAX("B",BDMX,0))
 I 'BDMTX D  Q:Y=-1
 .W !,"Creating ",BDMX," Taxonomy..."
 .S X=BDMX,DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 .I Y=-1 W !!,"ERROR IN CREATING ",BDMX," TAX" Q
 .S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)=BDMX,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=173,$P(^(0),U,13)=0,$P(^(0),U,15)=50,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 I $G(BDMTAX)]"" D
 .S A=0,B="" F  S A=$O(^ATXAX(BDMTX,21,A)) Q:A'=+A  S B=A
 .S BDMC=B
 .S ^ATXAX(BDMTX,21,0)="^9002226.02101A^"_B_U_B
 .S Z=$O(^ATXAX("B",BDMTAX,0))
 .S J=0 F  S J=$O(^PSDRUG(J)) Q:J'=+J  S C=$P($G(^PSDRUG(J,0)),U,2) I C]"",$D(^ATXAX(Z,21,"B",C)) D
 ..Q:$D(^ATXAX(BDMTX,21,"B",J))
 ..S BDMC=BDMC+1,^ATXAX(BDMTX,21,BDMC,0)=J_U_J
 I $G(BDMNDCT)]"" D
 .S A=0,B="" F  S A=$O(^ATXAX(BDMTX,21,A)) Q:A'=+A  S B=A
 .S BDMC=B
 .S ^ATXAX(BDMTX,21,0)="^9002226.02101A^"_B_U_B
 .S Z=$O(^ATXAX("B",BDMNDCT,0))
 .S J=0 F  S J=$O(^PSDRUG(J)) Q:J'=+J  S C=$P($G(^PSDRUG(J,2)),U,4) I C]"",$D(^ATXAX(Z,21,"B",C)) D
 ..Q:$D(^ATXAX(BDMTX,21,"B",J))
 ..S BDMC=BDMC+1,^ATXAX(BDMTX,21,BDMC,0)=J_U_J
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
LAB ;EP
 S BDMX="DM AUDIT P/C RATIO TAX" D LAB1
 Q
LAB1 ;
 S BDMDA=$O(^ATXLAB("B",BDMX,0))
 Q:BDMDA  ;taxonomy already exists
 W !,"Creating ",BDMX," Taxonomy..."
 S X=BDMX,DIC="^ATXLAB(",DIC(0)="L",DIADD=1,DLAYGO=9002228 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING ",BDMX," TAX" Q
 S BDMTX=+Y,$P(^ATXLAB(BDMTX,0),U,2)=BDMX,$P(^(0),U,5)=DUZ,$P(^(0),U,6)=DT,$P(^(0),U,8)="B",$P(^(0),U,9)=60
 S ^ATXLAB(BDMTX,21,0)="^9002228.02101PA^0^0"
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
LOINC ;EP
 S BDMX="DM AUDIT P/C RATIO LOINC"
 D LOINC1
 Q
 ;
LOINC1 ;
 S BDMDA=$O(^ATXAX("B",BDMX,0))
 Q:BDMDA  ;taxonomy already exisits
 W !,"Creating ",BDMX," Taxonomy..."
 S X=BDMX,DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002228 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING ",BDMX," TAX" Q
 S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)=BDMX,$P(^(0),U,5)=DUZ,$P(^(0),U,6)=DT,$P(^(0),U,8)="FIHS",$P(^(0),U,9)=95.3
 S ^ATXAX(BDMTX,21,0)="^9002228.02101PA^0^0"
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
 F BDMX="BDM DM2009 AUDIT MENU" D
 .S BDMY="DM08"
 .S X=$$ADD^XPDMENU("BDM M MAIN DM MENU",BDMX,BDMY,9)
 Q
 ;
DELFL ;delete entries out of the file before reinstalling
 F DA=1:1:40 S DIK="^BDMRECD(" D ^DIK
 F DA=1:1:20 S DIK="^BDMDMTX(" D ^DIK
 Q
 ;