Index: ccr/branches/ohum/p/C0CVITAL.m
===================================================================
--- ccr/branches/ohum/p/C0CVITAL.m	(revision 1291)
+++ ccr/branches/ohum/p/C0CVITAL.m	(revision 1325)
@@ -1,4 +1,4 @@
 C0CVITAL ; CCDCCR/CJE/GPL - CCR/CCD PROCESSING FOR VITALS ; 07/16/08
- ;;1.0;C0C;;May 19, 2009;Build 38
+ ;;1.0;C0C;;May 19, 2009;Build 39
  ;Copyright 2008,2009 George Lilly, University of Minnesota and others.
  ;Licensed under the terms of the GNU General Public License.
@@ -58,5 +58,5 @@
  N VSORT,VDATES,VCNT ; ARRAY FOR DATE SORTED VITALS INDEX
  D VITDVISTA(.VDATES) ; PULL OUT THE DATES INTO AN ARRAY
- I DEBUG ZWR VDATES ;DEBUG
+ ; I DEBUG ZWR VDATES ;DEBUG
  S VCNT=$$SORTDT^C0CUTIL(.VSORT,.VDATES,-1) ; PUT VITALS IN REVERSE
  ; DATE ORDER AND COUNT THEM. VSORT CONTAINS INDIRECT INDEXES ONLY
@@ -72,8 +72,4 @@
  . . I DEBUG W $P(VITPTMP,U,4),!
  . . S @VITVMAP@("VITALSIGNSDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID
-        . . ;B  ;gpl
-        . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^GMR(120.5,$P(VITPTMP,U,1),0)),U,6)
-        . . I @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_" D  ;
-        . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORSYSTEM_1"
  . . I $P(VITPTMP,U,2)="HT" D
  . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
@@ -87,5 +83,5 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="in"
@@ -101,10 +97,10 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="lbs"
  . . E  I $P(VITPTMP,U,2)="BP" D
  . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
- . . . ;S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT")
+ . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT")
  . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="BLOOD PRESSURE"
  . . . S @VITVMAP@("VITALSIGNSSOURCEACTORID")="ACTORSYSTEM_1"
@@ -115,5 +111,5 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
@@ -129,5 +125,5 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="F"
@@ -143,5 +139,5 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
@@ -157,5 +153,5 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
@@ -171,19 +167,5 @@
  . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
  . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
- . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
- . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
- . . E  I $P(VITPTMP,U,2)="BMI" D
- . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED"
- . . . S @VITVMAP@("VITALSIGNSEXACTDATETIME")=$$FMDTOUTC^C0CUTIL($P(VITPTMP,U,4),"DT")
- . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="BMI"
- . . . S @VITVMAP@("VITALSIGNSSOURCEACTORID")="ACTORSYSTEM_1"
- . . . S @VITVMAP@("VITALSIGNSTESTOBJECTID")="VITALTEST"_J
- . . . S @VITVMAP@("VITALSIGNSTESTTYPETEXT")="OBSERVED"
- . . . S @VITVMAP@("VITALSIGNSDESCRIPTIONTEXT")="BMI"
- . . . S @VITVMAP@("VITALSIGNSDESCCODEVALUE")="60621009"
- . . . S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")="SNOMED"
- . . . S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")=""
@@ -200,9 +182,7 @@
  . . . ;S @VITVMAP@("VITALSIGNSDESCCODINGSYSTEM")=""
  . . . ;S @VITVMAP@("VITALSIGNSCODEVERSION")=""
- . . . ;S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P($G(^GMR(120.5,$P(VITPTMP,U,1),0)),U,6)
+ . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_"_$P(^GMR(120.5,$P(VITPTMP,U,1),0),U,6)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTVALUE")=$P(VITPTMP,U,3)
  . . . S @VITVMAP@("VITALSIGNSTESTRESULTUNIT")="UNKNOWN"
-        . . I @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORPROVIDER_" D  ;
-        . . . S @VITVMAP@("VITALSIGNSTESTSOURCEACTORID")="ACTORSYSTEM_1" ;
  . . S VITARYTMP=$NA(@VITTARYTMP@(J))
  . . K @VITARYTMP
