Changeset 288 for ccr


Ignore:
Timestamp:
Nov 19, 2008, 12:01:28 PM (16 years ago)
Author:
George Lilly
Message:

updated alert coding analysis

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/KBAICSNA.m

    r286 r288  
    4343    . S TTERM=$P(@GMRBASE@(SNOIEN,0),"^",1)_" ALLERGY"
    4444    . D TEXTRPC(.SNORTN,TTERM)
    45     . I '$D(SNORTN) Q  ;
    46     . S TVUID=$$GET1^DIQ(120.82,SNOIEN,"VUID")
    47     . W "VUID:",VUID,!
    48     . K @SNOBASE@("VARS",SNOIEN) ; CLEAR OUT OLD VARS
    49     . I $P(TTMP,"^",1)=1 S @SNOBASE@("VARS",SNOIEN)=TTERM_"^"_TTMP_"^"_SNORTN(0)
    50     . ;
    51     . ; EVALUATE THE VARIABLES AND CREATE AN ATTRIBUTE MAP
    52     . ;
    53     . S RATTR=$$SETATTR(SNOIEN) ; SET THE ATTRIBUTE STRING BASED ON THE VARS
    54     . S @SNOBASE@("ATTR",SNOIEN)=RATTR ; SAVE THE ATRIBUTES FOR THIS DRUG
    55     . ;
    56     . N CATNAME,CATTBL
    57     . S CATNAME=""
    58     . D CPUSH(.CATNAME,SNOBASE,"SNOTBL",SNOIEN,RATTR) ; ADD TO CATEGORY
    59     . ; W "CATEGORY NAME: ",CATNAME,!
    60     . ;
     45    . I $D(SNORTN) D  ;
     46    . . S TVUID=$$GET1^DIQ(120.82,SNOIEN,"VUID")
     47    . . W "VUID:",TVUID,!
     48    . . K @SNOBASE@("VARS",SNOIEN) ; CLEAR OUT OLD VARS
     49    . . I $P(TTMP,"^",1)=1 S @SNOBASE@("VARS",SNOIEN)=TTERM_"^"_TTMP_"^"_SNORTN(0)_"^"_TVUID_"^"_SNORTN("F")
     50    . . ;
     51    . . ; EVALUATE THE VARIABLES AND CREATE AN ATTRIBUTE MAP
     52    . . ;
     53    . . S RATTR=$$SETATTR(SNOIEN) ; SET THE ATTRIBUTE STRING BASED ON THE VARS
     54    . . S @SNOBASE@("ATTR",SNOIEN)=RATTR ; SAVE THE ATRIBUTES FOR THIS DRUG
     55    . . ;
     56    . . N CATNAME,CATTBL
     57    . . S CATNAME=""
     58    . . D CPUSH(.CATNAME,SNOBASE,"SNOTBL",SNOIEN,RATTR) ; ADD TO CATEGORY
     59    . . ; W "CATEGORY NAME: ",CATNAME,!
     60    . . ;
    6161    . S SNOIEN=$O(@GMRBASE@(SNOIEN)) ; NEXT RECORD
    6262    . S @SNOBASE@("RESUME")=SNOIEN ; WHERE WE ARE LEAVING OFF THIS RUN
     
    183183 N SNOI,SNOJ,SNOK,SNOSNO,SNOSEC,SNOIEN,SNOOLD,SNOSRCH
    184184 D DO^KBAICX1 ; INITIALIZE GPLSAV VARIABLES
    185  S SAVBASE=$NA(^TMP("GPLSAV","VARS"))
     185 ;S SAVBASE=$NA(^TMP("GPLSAV","VARS"))
     186 S SAVBASE=$NA(@SNOBASE@("VARS"))
    186187 S CSVARY=$NA(^TMP("GPLSNO","CSV"))
    187188 K @CSVARY
    188  D PUSH^GPLXPATH(CSVARY,"OLDCODE|GMRText|MediationCode|MediationText") ; header for CSV file
     189 D PUSH^GPLXPATH(CSVARY,"VUID|VUIDText|MediationCode|MediationText") ; header for CSV file
    189190 S SNOI=""
    190191 F  D  Q:$O(@SAVBASE@(SNOI))="" ;THE WHOLE LIST
     
    197198 . S SNOSEC=$P(SNOJ,"^",5) ; SECTION OF SNOMED FOR THIS CODE
    198199 . S SNOOLD=$P(SNOJ,"^",7) ; OLD NUMBER FOR THIS CODE
    199  . D PUSH^GPLXPATH(CSVARY,SNOOLD_"|"_$P(SNOSRCH," ALLERGY",1)_"|"_SNOSNO_"|"_SNOSRCH_"("_SNOSEC_")")
     200 . S SNOVUID=$P(SNOJ,"^",9) ; VUID FOR THIS RECORD
     201 . S SNOTXT=$P(SNOJ,"^",10) ; NOMED TEXT FOR CODE
     202 . D PUSH^GPLXPATH(CSVARY,SNOVUID_"|"_$P(SNOSRCH," ALLERGY",1)_"|"_SNOSNO_"|"_SNOTXT)
    200203 . W "SEARCH:",SNOSRCH," IEN:",SNOIEN," CODE:",SNOSNO," SEC:",SNOSEC," OLD:",SNOOLD,!
    201204 . W SNOK,!
     
    204207 D PARY^GPLXPATH(CSVARY)
    205208 S OFILE="GMR_ALLERGY_MAPPING_TABLE.csv"
    206  S ODIR="/home/glilly/"
     209 S ODIR="/home/vademo2/"
    207210 S ZY=$$OUTPUT^GPLXPATH(OARY,OFILE,ODIR)
    208211 I ZY W "WROTE ",OFILE," to ",ODIR,!
Note: See TracChangeset for help on using the changeset viewer.