Changeset 235


Ignore:
Timestamp:
Oct 27, 2008, 11:42:09 AM (16 years ago)
Author:
George Lilly
Message:

fixing Alerts

File:
1 edited

Legend:

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

    r232 r235  
    4545 . S @ALTVMAP@("ALERTOBJECTID")="ALERT"_ALTCNT
    4646 . N A1 S A1=@ALTG@(ALTTMP) ; ALL THE PIECES
    47  . N A2 S A2=$P(A1,U,4) ; ALLERGIC FLAG
     47 . N A2 S A2=$$GET1^DIQ(120.8,ALTTMP,"MECHANISM","I") ; MECHANISM
    4848 . N A3 S A3=$P(A1,U,5) ; ADVERSE FLAG
    4949 . N ADT S ADT="Patient has an " ; X $ZINT H 5
    50  . S ADT=ADT_$S(A1=1:"ADVERSE",A2=1:"ALLERGIC",1:"UNKNOWN")
     50 . S ADT=ADT_$S(A2="P":"ADVERSE",A2="A":"ALLERGIC",1:"UNKNOWN")
    5151 . S ADT=ADT_" reaction to "_$P(@ALTG@(ALTTMP),U,2)_"."
    5252 . S @ALTVMAP@("ALERTDESCRIPTIONTEXT")=ADT
    5353 . N ALTCDE ; SNOMED CODE THE THE ALERT
    54  . S ALTCDE=$S(A2=1:"282100009",1:"418634005") ; IF NOT ADVERSE, IT IS ALLERGIC
     54 . S ALTCDE=$S(A2="P":"282100009",A2="A":"418634005",1:"") ; IF NOT ADVERSE, IT IS ALLERGIC
    5555 . S @ALTVMAP@("ALERTCODEVALUE")=ALTCDE ;
    5656 . ; WILL USE 418634005 FOR ALLERGIC REACTION TO A SUBSTANCE
Note: See TracChangeset for help on using the changeset viewer.