Changeset 343


Ignore:
Timestamp:
Jan 25, 2009, 3:29:07 PM (16 years ago)
Author:
George Lilly
Message:

improvements to Problems and Alerts, added dates, type

Location:
ccr/trunk/p
Files:
4 edited

Legend:

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

    r340 r343  
    5151 S C0CREF=GIEN_"," ; OPEN ROOT REFERENCE INTO FILE
    5252 D CLEAN^DILF ; MAKE SURE WE ARE CLEANED UP
    53  D GETS^DIQ(GFILE,C0CREF,"**","","C0CTMP")
     53 D GETS^DIQ(GFILE,C0CREF,"**","I","C0CTMP")
    5454 D FIELDS(GRTN,GFILE) ;GET ALL THE FIELD NAMES FOR THE FILE
    5555 S @GRTN@(0)=GFILE_"^RNF1^"_GIEN_"^"_DT_"^"_$J ; STRUCTURE SIGNATURE
     
    105105 D CLEAN^DILF ; MAKE SURE WE ARE CLEANED UP
    106106 K C0CTMP
    107  D GETS^DIQ(GFILE,C0CREF,"**","","C0CTMP")
     107 D GETS^DIQ(GFILE,C0CREF,"**","IE","C0CTMP")
    108108 D FIELDS(GRTN,GFILE) ;GET ALL THE FIELD NAMES FOR THE FILE
    109109 S @GRTN@(0)=GFILE_"^RNF1^"_GIEN_"^"_DT_"^"_$J_"^"_DUZ ; STRUCTURE SIGNATURE
     
    114114 . . ;W C0CJ," ",C0CI,!
    115115 . . S C0CNAME=$P(^DD(C0CJ,C0CI,0),"^",1) ;PULL THE FIELD NAME
    116  . . S C0CVALUE=C0CTMP(C0CJ,C0CREF,C0CI) ;
     116 . . S C0CVALUE=C0CTMP(C0CJ,C0CREF,C0CI,"E") ;
    117117 . . I C0CVALUE["C0CTMP" D  ; WP FIELD
    118118 . . . N ZT,ZWP S ZWP=0 ;ITERATOR
     
    124124 . . . . S C0CVALUE=C0CVALUE_ZT ;
    125125 . . S $P(@GRTN@(C0CNAME),"^",3)=C0CVALUE ;RETURN VALUE IN P3
     126 . . S $P(@GRTN@(C0CNAME,"I"),"^",3)=$G(C0CTMP(C0CJ,C0CREF,C0CI,"I"))
    126127 I C0CNN D  ; IF ONLY NON-NULL VALUES ARE TO BE RETURNED
    127128 . S C0CI=""
     
    280281 Q $P(@ZTAB@(ZFN),"^",3)
    281282 ;
     283ZVALUEI(ZFN,ZTAB) ;EXTRINSIC TO RETURN VALUE FOR FIELD NAME PASSED
     284 ; BY VALUE IN ZFN. FILE NUMBER IS PIECE 3 OF @ZTAB@(ZFN)
     285 ; IF ZTAB IS NULL, IT DEFAULTS TO C0CA
     286 I '$D(ZTAB) S ZTAB="C0CA"
     287 Q $P(@ZTAB@(ZFN,"I"),"^",3)
     288 ;
  • ccr/trunk/p/GPLALERT.m

    r266 r343  
    5151 . S ADT=ADT_" reaction to "_$P(@ALTG@(ALTTMP),U,2)_"."
    5252 . S @ALTVMAP@("ALERTDESCRIPTIONTEXT")=ADT
     53 . N ADTY S ADTY=$S(A2="P":"Adverse Reaction",A2="A":"Allergy",1:"") ;
     54 . S @ALTVMAP@("ALERTTYPE")=ADTY ; type of allergy
    5355 . N ALTCDE ; SNOMED CODE THE THE ALERT
    5456 . S ALTCDE=$S(A2="P":"282100009",A2="A":"418634005",1:"") ; IF NOT ADVERSE, IT IS ALLERGIC
     
    99101 . . S @ALTVMAP@("ALERTREACTIONCODESYSTEM")=""
    100102 . S ALTARYTMP=$NA(@ALTTARYTMP@(ALTCNT))
     103 . ; NOW GO TO THE GLOBAL TO GET THE DATE/TIME AND BETTER DESCRIPTION
     104 . N C0CG1,C0CT ; ARRAY FOR VALUES FROM GLOBAL
     105 . D GETN1^C0CRNF("C0CG1",120.8,DFN,"B") ;GET VALUES BY NAME
     106 . S C0CT=$$ZVALUEI^C0CRNF("ORIGINATION DATE/TIME","C0CG1")
     107 . S @ALTVMAP@("ALERTDATETIME")=$$FMDTOUTC^CCRUTIL(C0CT)
    101108 . K @ALTARYTMP
    102109 . D MAP^GPLXPATH(ALTXML,ALTVMAP,ALTARYTMP)
  • ccr/trunk/p/GPLCCR0.m

    r338 r343  
    105105 ;;<Text>Problem</Text>
    106106 ;;</Type>
     107 ;;<Status>
     108 ;;<Text>@@PROBLEMSTATUS@@</Text>
     109 ;;</Status>
    107110 ;;<Description>
    108111 ;;<Text>@@PROBLEMDESCRIPTION@@</Text>
     
    113116 ;;</Code>
    114117 ;;</Description>
     118 ;;<DateTime>
     119 ;;<ExactDateTime>@@PROBLEMDATEMOD@@</ExactDateTime>
     120 ;;</DateTime>
    115121 ;;<Source>
    116122 ;;<Actor>
     
    220226 ;;<Alert>
    221227 ;;<CCRDataObjectID>@@ALERTOBJECTID@@</CCRDataObjectID>
     228 ;;<Type>
     229 ;;<Text>@@ALERTTYPE@@</Text>
     230 ;;</Type>
    222231 ;;<Description>
    223232 ;;<Text>@@ALERTDESCRIPTIONTEXT@@</Text>
     
    230239 ;;<Text>@@ALERTSTATUSTEXT@@</Text>
    231240 ;;</Status>
     241 ;;<DateTime>
     242 ;;<ExactDateTime>@@ALERTDATETIME@@</ExactDateTime>
     243 ;;</DateTime>
    232244 ;;<Source>
    233245 ;;<Actor>
  • ccr/trunk/p/GPLPROBS.m

    r328 r343  
    1717 ;with this program; if not, write to the Free Software Foundation, Inc.,
    1818 ;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
    19  ; 
    20  ; 
     19 ;
     20 ;
    2121 ; PROCESS THE PROBLEMS SECTION OF THE CCR
    2222 ;
     
    4949 . S @VMAP@("PROBLEMOBJECTID")="PROBLEM"_J ; UNIQUE OBJID FOR PROBLEM
    5050 . S @VMAP@("PROBLEMIEN")=$P(PTMP,U,1)
    51  . S @VMAP@("PROBLEMSTATUS")=$P(PTMP,U,2)
     51 . S @VMAP@("PROBLEMSTATUS")=$S($P(PTMP,U,2)="A":"Active",1:"")
    5252 . S @VMAP@("PROBLEMDESCRIPTION")=$P(PTMP,U,3)
    5353 . S @VMAP@("PROBLEMCODINGVERSION")=""
    5454 . S @VMAP@("PROBLEMCODEVALUE")=$P(PTMP,U,4)
    55  . S @VMAP@("PROBLEMDATEOFONSET")=$P(PTMP,U,5)
    56  . S @VMAP@("PROBLEMDATEMOD")=$P(PTMP,U,6)
     55 . S @VMAP@("PROBLEMDATEOFONSET")=$$FMDTOUTC^CCRUTIL($P(PTMP,U,5),"DT")
     56 . S @VMAP@("PROBLEMDATEMOD")=$$FMDTOUTC^CCRUTIL($P(PTMP,U,6),"DT")
    5757 . S @VMAP@("PROBLEMSC")=$P(PTMP,U,7)
    5858 . S @VMAP@("PROBLEMSE")=$P(PTMP,U,8)
     
    6565 . S @VMAP@("PROBLEMSERVICE")=$P(PTMP,U,13)
    6666 . S @VMAP@("PROBLEMHASCMT")=$P(PTMP,U,14)
    67  . S @VMAP@("PROBLEMDTREC")=$P(PTMP,U,15)
    68  . S @VMAP@("PROBLEMINACT")=$P(PTMP,U,16)
     67 . S @VMAP@("PROBLEMDTREC")=$$FMDTOUTC^CCRUTIL($P(PTMP,U,15),"DT")
     68 . S @VMAP@("PROBLEMINACT")=$$FMDTOUTC^CCRUTIL($P(PTMP,U,16),"DT")
    6969 . S ARYTMP=$NA(@TARYTMP@(J))
    7070 . ; W "ARYTMP= ",ARYTMP,!
Note: See TracChangeset for help on using the changeset viewer.