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

APCLD8PS.m

Go to the documentation of this file.
APCLD8PS ; IHS/CMI/LAB - NO DESCRIPTION PROVIDED 28 Jan 2005 1:34 PM ;
 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
 ;
 ;
MAIN ;EP
 D DRUG,LAB,MENU  ;LAB,LOINC,MENU
 D ^APCL8X
 Q
 ;
DRUG ;EP set up drug taxonomies
 S ATXFLG=1
 S APCLX="DM AUDIT INCRETIN MIMETIC",APCLTAX="",APCLNDCT="" D DRUG1
 S APCLX="DM AUDIT DPP4 INHIBITOR DRUGS",APCLTAX="",APCLNDCT="" D DRUG1
 Q
DRUG1 ;
 S APCLTX=$O(^ATXAX("B",APCLX,0))
 I 'APCLTX D  Q:Y=-1
 .W !,"Creating ",APCLX," Taxonomy..."
 .S X=APCLX,DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 .I Y=-1 W !!,"ERROR IN CREATING ",APCLX," TAX" Q
 .S APCLTX=+Y,$P(^ATXAX(APCLTX,0),U,2)=APCLX,$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(APCLTX,21,0)="^9002226.02101A^0^0"
 S DA=APCLTX,DIK="^ATXAX(" D IX1^DIK
 I $G(APCLTAX)]"" D
 .S A=0,B="" F  S A=$O(^ATXAX(APCLTX,21,A)) Q:A'=+A  S B=A
 .S APCLC=B
 .S ^ATXAX(APCLTX,21,0)="^9002226.02101A^"_B_U_B
 .S Z=$O(^ATXAX("B",APCLTAX,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(APCLTX,21,"B",J))
 ..S APCLC=APCLC+1,^ATXAX(APCLTX,21,APCLC,0)=J_U_J
 I $G(APCLNDCT)]"" D
 .S A=0,B="" F  S A=$O(^ATXAX(APCLTX,21,A)) Q:A'=+A  S B=A
 .S APCLC=B
 .S ^ATXAX(APCLTX,21,0)="^9002226.02101A^"_B_U_B
 .S Z=$O(^ATXAX("B",APCLNDCT,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(APCLTX,21,"B",J))
 ..S APCLC=APCLC+1,^ATXAX(APCLTX,21,APCLC,0)=J_U_J
 S DA=APCLTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
LAB ;EP
 S APCLX="DM AUDIT P/C RATIO TAX" D LAB1
 Q
LAB1 ;
 S APCLDA=$O(^ATXLAB("B",APCLX,0))
 Q:APCLDA  ;taxonomy already exists
 W !,"Creating ",APCLX," Taxonomy..."
 S X=APCLX,DIC="^ATXLAB(",DIC(0)="L",DIADD=1,DLAYGO=9002228 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING ",APCLX," TAX" Q
 S APCLTX=+Y,$P(^ATXLAB(APCLTX,0),U,2)=APCLX,$P(^(0),U,5)=DUZ,$P(^(0),U,6)=DT,$P(^(0),U,8)="B",$P(^(0),U,9)=60
 S ^ATXLAB(APCLTX,21,0)="^9002228.02101PA^0^0"
 S DA=APCLTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
LOINC ;EP
 S APCLX="DM AUDIT P/C RATIO LOINC"
 D LOINC1
 Q
 ;
LOINC1 ;
 S APCLDA=$O(^ATXAX("B",APCLX,0))
 Q:APCLDA  ;taxonomy already exisits
 W !,"Creating ",APCLX," Taxonomy..."
 S X=APCLX,DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002228 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING ",APCLX," TAX" Q
 S APCLTX=+Y,$P(^ATXAX(APCLTX,0),U,2)=APCLX,$P(^(0),U,5)=DUZ,$P(^(0),U,6)=DT,$P(^(0),U,8)="FIHS",$P(^(0),U,9)=95.3
 S ^ATXAX(APCLTX,21,0)="^9002228.02101PA^0^0"
 S DA=APCLTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
 F APCLX="APCL DM2008 AUDIT MENU" D
 .S APCLY="DM08"
 .S X=$$ADD^XPDMENU("APCL M MAIN DM MENU",APCLX,APCLY,9)
 Q
 ;
DELFL ;delete entries out of the file before reinstalling
 F DA=1:1:40 S DIK="^APCLRECD(" D ^DIK
 F DA=1:1:20 S DIK="^APCLDMTX(" D ^DIK
 Q
 ;