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

DVBYPGD2.m

Go to the documentation of this file.
  1. DVBYPGD2 ;ALB/CMM; New Disability Codes file 31 ;9/25/95
  1. ;;V4.0;HINQ;**27**;03/25/92
  1. ;
  1. EN ;start of routine
  1. N LP,LP1,JCNT,CODE,TEXT
  1. S JCNT=0
  1. W !!,"Adding to the Disability Condition file.",!!
  1. F LP=1:1 S LP1=$T(TXT+LP) Q:LP1="" DO
  1. .S CODE=$P(LP1,";;",2)
  1. .S TEXT=$P(CODE,";",2)
  1. .S CODE=$P(CODE,";",1)
  1. .I $L(TEXT)>45 S TEXT=$E(TEXT,1,45)
  1. .K JSTOP
  1. .D CHK
  1. .I $D(JSTOP) Q
  1. .S DIC="^DIC(31,",DIC("DR")="2///"_CODE,X=TEXT,DLAYGO=31,DIC(0)="L"
  1. .K DD,DO
  1. .D FILE^DICN
  1. .K DO,DD,DLAYGO
  1. .I +Y>0 S JCNT=JCNT+1 W "."
  1. .I +Y<0 W !,"Not able to add Disability Condition "_CODE_"."
  1. W !!!,"The Disability Condition file (31) update has finished. ",!," "_JCNT_" disability codes were added."
  1. K DIC,JSTOP,DLAYGO,X,Y,DIE,DR,DA
  1. Q
  1. ;
  1. CHK ;checks for the existance of the codes in the c cross ref.
  1. I $D(^DIC(31,"C",CODE)) S JSTOP=1
  1. I $D(^DIC(31,"B",$E(TEXT,1,30))) S JSTOP=1
  1. I $D(JSTOP) W !,"Disability Condition "_CODE_" was not added. Entry already exists."
  1. Q
  1. ;
  1. TXT ;new exams to be added.
  1. ;;6354;CHRONIC FATIGUE SYNDROME (CFS)
  1. ;;7628;BENIGN NEOPLASMS OF THE GYNECOLOGICAL SYSTEM OR BREAST
  1. ;;7629;ENDOMETRIOSIS