﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14	Issue in listing down the Radiology order status in reports tab in CPRS	elanchezhiyan	Kevin Toppenberg	"We faced an issue on Status list for radiology orders on Reports tab. 


Replication Steps: 


1. Make more than 4 radiology orders 
2. Select all the four and sign at once 
3. Go to Reports tab 
4. Select Clinical reports -- Radiology 
5. and click on Status menu 
6. you could see only one or two items listed but not all. 


Reason for the issue: ( if at all it is not supposed to be VistA 
functionality) 


Since all new orders signed at same time, some global entries taken 
the same date time. 


for example ,, 


^TMP(""GMTSRAD"",7488,6899590.898492,3,847)=""3100408.101508^p^ABDOMEN 
LATERAL VIEW|(ONE FILM)^^MANAGER,SYSTEM"" 
^TMP(""GMTSRAD"",7488,6899590.898492,3,847,0)="""" 
^TMP(""GMTSRAD"",7488,6899590.898492,4,846)=""3100408.101508^p^ABDOMEN 
FOR PREGNANCY^^MANAGER,SYSTEM"" 
^TMP(""GMTSRAD"",7488,6899590.898492,4,846,0)="""" 
^TMP(""GMTSRAD"",7488,6899590.898492,5,848)=""3100408.101508^p^BARIUM 
MEAL COMPLETE^^MANAGER,SYSTEM"" 
^TMP(""GMTSRAD"",7488,6899590.898492,5,848,0)="""" 
^TMP(""GMTSRAD"",7488,6899590.898494,2,627)=""3100408.101506^p^ABDOMEN AP OR ERECT (ONE|FILM)^^MANAGER,SYSTEM"" 
^TMP(""GMTSRAD"",7488,6899590.898494,2,627,0)="""" 


but the OE/RR reports ^TMP(""ORDATA"", nodes is gettting overwritten by the nodes having the same dates. please check the code pasted under solution.


Solution: 


In RS^ORDV03, 


...S CNT=CNT+1 
 ...S SITE=$S($L($G(^TMP(""GMTSRAD"", 
$J,ORDT,ORDA,ORDA2,""facility""))):^(""facility""),1:ORSITE) 
 ...;[ELN] 
 ...;S ^TMP(""ORDATA"",$J,ORDT,""WP"",1)=""1^""_SITE 
 ...S ^TMP(""ORDATA"",$J,ORDA,""WP"",1)=""1^""_SITE 
 ...;S ^TMP(""ORDATA"",$J,ORDT,""WP"",2)=""2^""_$$DATE^ORDVU($P(REC,""^"")) 
 ...S ^TMP(""ORDATA"",$J,ORDA,""WP"",2)=""2^""_$$DATE^ORDVU($P(REC,""^"")) 
 ...;S ^TMP(""ORDATA"",$J,ORDT,""WP"",3)=""3^""_ 
$S(STAT=""d"":""Discontinued"",STAT=""c"":""Complete"",STAT=""h"":""Hold"",STAT=""p"":""Pe­nding"",STAT=""a"":""Active"",STAT=""s"":""Scheduled"",STAT=""u"":""Unreleased"", 
1:STAT) 
 ...S ^TMP(""ORDATA"",$J,ORDA,""WP"",3)=""3^""_ 
$S(STAT=""d"":""Discontinued"",STAT=""c"":""Complete"",STAT=""h"":""Hold"",STAT=""p"":""Pe­nding"",STAT=""a"":""Active"",STAT=""s"":""Scheduled"",STAT=""u"":""Unreleased"", 
1:STAT) 
 ...;S ^TMP(""ORDATA"",$J,ORDT,""WP"",4)=""4^""_$P(REC,""^"",3) 
 ...S ^TMP(""ORDATA"",$J,ORDA,""WP"",4)=""4^""_$P(REC,""^"",3) 
 ...;S ^TMP(""ORDATA"",$J,ORDT,""WP"",5)=""5^""_$$DATE^ORDVU($P(REC,""^"",4)) 
 ...S ^TMP(""ORDATA"",$J,ORDA,""WP"",5)=""5^""_$$DATE^ORDVU($P(REC,""^"",4)) 
 ...;S ^TMP(""ORDATA"",$J,ORDT,""WP"",6)=""6^""_$P(REC,""^"",5) 
 ...S ^TMP(""ORDATA"",$J,ORDA,""WP"",6)=""6^""_$P(REC,""^"",5) 
 ...;[ELN] 
 S ROOT=$NA(^TMP(""ORDATA"",$J)) 
 Q 

so I have changed the ORDT order date-time with ORDA record number.

Please review and give your comments.

Thanks."	defect	new	minor		CPRS				
