If i query the same study in Efilm or Radiant the description is shown.
Can you guide how to fix this. Do i need to populate some fields in Database or what???
If i query the same study in Efilm or Radiant the description is shown.
Can you guide how to fix this. Do i need to populate some fields in Database or what???
Hi
I am facing a problem i getting series details of MRI Studies.
When my doctor query PACS Server from ClearCanvas Workstation v 2.0 & 13.2; and click on Series Details. No information is shown. Whereas details of same study is shown in Efilm and Radiant Workstation.
Please guide how to fix this issue.
--HM
Use dgate64.exe "--modifypatid:1234,2107260848098474,E:\Images\DX\unknown\unknown\26-07-2021\A334892-2- (^xxxxxx)\Ankle_Stress_AP\00010004.dcm"
Marcel
Hi Marcel
Today when i tried to use the same command to modify some Patient IDs, i am getting error :: "
[PACS] Server command sent using DGATE -- option
[PACS] ***File to modify does not exist or is not on a MAG device"
Please guide. my syntax is as follow:-
dgate64.exe --"modifypatid:NewPatientID,StudyID, Complete Path to image on file systemsystem"
Thanks that worked.
Please verify the syntax of these two statements.
PatientID -> dgate64.exe --modifystudy:Old Patient ID,Study ID,"set 0010,0020 to \"New Patient ID\"; "
PatientName -> dgate64.exe--modifystudy:Patient ID,Study ID,"set 0010,0010 to \"New Patient Name\"; "
I ad searched the forum and found this command from one of the post . But it doesn't work for me.
dgate64 --modifystudy:,1.2.840.113619.2.22.287.1.529.20000719.265546,"newuids;set 0010,0020 to \"CCCCM73C23I189E\";"
--HM
Hi
I am using following command (dgate64.exe --modifypatid:"1234","2107260848098474","E:\Images\DX\unknown\unknown\26-07-2021\A334892-2- (^xxxxxx)\Ankle_Stress_AP\00010004.dcm") to modify wrong patient ID but it give me error:
[PACS] Server command sent using DGATE -- option
[PACS] ***File to modify does not exist or is not on a MAG device
If i use this command
PatientID -> dgate64.exe --modifystudy:Old Patient ID,Study ID,"set 0010,0020 to \"New Patient ID\"; "
PatientName -> dgate64.exe--modifystudy:Patient ID,Study ID,"set 0010,0010 to \"New Patient Name\"; "
Same error :
[PACS] Server command sent using DGATE -- option
[PACS] ***File to modify does not exist or is not on a MAG device
Please guide
Thanks for bearing me.
It worked.
robert , I tried with your suggestion( change QueryConverter to QueryResultConverter). Now the script doesn't execute this command (if Data.QueryRetrieveLevel=='STUDY'). If i comment this it works but all records/studies result are viewed.
Can somebody tell me how can i read the private tag (0x9999,0x9003 status 16 SQL_C_CHAR DT_STR) in my lua.
I had tried local status =Data['9999,9002']. and local status =Data.Status. Both prints Nil Result.
This is the modified version of the script
local a = dbquery("DICOMStudies","Status","StudyInsta","StudyInsta='"..Data.StudyInstanceUID.."'")
print ("Status value is:: "..a[1][1])
if (a[1][1]=='B') then print("Block Status") reject() print("After Reject") end
Output
[PACS] UPACS THREAD 3: STARTED AT: Fri Jul 30 19:54:18 2021
[PACS] Calling Application Title : "RADIANT "
[PACS] Called Application Title : "PACS "
[PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
[PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
[PACS] (StudyRootQuery) search level: STUDY
[PACS] Hello
[PACS] Status value is:: A
[PACS] Hello
[PACS] Status value is:: B
[PACS] Block Status
[PACS] After Reject .................................................. It doesn't reject this record but executes it.Can somebody guide how to skip this in the query result
[PACS] Hello
[PACS] Status value is:: A
[PACS] Hello
[PACS] Status value is:: A
[PACS] Hello
[PACS] Status value is:: A
[PACS] Hello
[PACS] Status value is:: A
[PACS] Hello
[PACS] Status value is:: A
[PACS] C-Find (StudyRoot) located 7 records
[PACS] UPACS THREAD 3: ENDED AT: Fri Jul 30 19:54:18 2021
[PACS] UPACS THREAD 3: TOTAL RUNNING TIME: 0 SECONDS
Hi
I debug the Lua script (appended below), i came on following conclusion that after the second IF statement the print is executed but the reject () function doesn't execute. I think that is the reason all the records are returned.
print("Hello")
if Data.QueryRetrieveLevel=='STUDY' then
local a = dbquery("DICOMStudies","Status","StudyInsta","StudyInsta='"..Data.StudyInstanceUID.."'")
if (#a==0) then destroy() end
print("Value of A is::"..#a)
print ("Status value is:: "..a[1][1])
if (a[1][1]=='B') then print("Block Status") destroy() end
end
Output
[PACS]
[PACS] UPACS THREAD 2: STARTED AT: Fri Jul 30 15:50:12 2021
[PACS] Calling Application Title : "RADIANT "
[PACS] Called Application Title : "PACS "
[PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
[PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
[PACS] Hello
[PACS] Value of A is::7
[PACS] Status value is:: B
[PACS] Block Status
[PACS] (StudyRootQuery) search level: STUDY
[PACS] C-Find (StudyRoot) located 0 records
[PACS] UPACS THREAD 2: ENDED AT: Fri Jul 30 15:50:12 2021
[PACS] UPACS THREAD 2: TOTAL RUNNING TIME: 0 SECONDS
Now i have some scan with status A and some with B. But the above script shows all scans or no scans (in some cases). The script doesn't loop through the fetched records. It reads only one first record (that can be first, last or middle one) and on status of that executes the second IF.
I think (might be i am wrong) the if statements are not executed for each fetched records.... Is there some sort of loop which checks and then throw the result???
If there any other way that i query dicomstudies table only on status column and return result. Is it possible to query on single column????
It means i cannot use StudyInstace UID in QueryConvertor????
That's the reason StudyInstance UID is not populated as i am making a wild query on the server. BUt my question remains the same WHY DID THE CODE EXECUTED FOR 4 HOURS???
If there any temp or cache that PACS Server maintains?? Reason is i had deleted a lua file that is associated with filename syntax but the server still save some of the images with defined syntax. I am confused on that.
Can you guide me on any work around???
Hi
On Test Server with limited studies the OHIF Viewer (using dicomweb proxy) shows Studies list but when i moved to Production server with 75TB of data. It sows no studies and following error on server
[HPACS] UPACS THREAD 20: STARTED AT: Wed Jul 28 17:41:10 2021
[HPACS] Calling Application Title : "DICOMWEB_PROXY "
[HPACS] Called Application Title : "HPACS "
[HPACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
[HPACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
[HPACS] ***(Exp) Encountered an invalid group order during load of DCM file (after 00081190)
[HPACS] ***Client Error: command 0020 failed **
[HPACS] ***Connection Terminated
Instead of loading whole data can i ask the user to query server for required data or load today's studies only.
Hi Marcel
I did some debugging with my lua script and found that StudyInstanceUID is not printing. This is my server log
[PACS]
[PACS] UPACS THREAD 35: STARTED AT: Wed Jul 28 14:26:37 2021
[PACS] Calling Application Title : "RADIANT "
[PACS] Called Application Title : "PACS "
[PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
[PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
[PACS] Hello
[PACS] (Study instance UID should be printed here but its not)
[PACS] Value of A is::1
[PACS] Status value is:: B
[PACS] (Study instance UID should be printed here but its not)
[PACS] (StudyRootQuery) search level: STUDY
[PACS] C-Find (StudyRoot) located 1 records
[PACS] UPACS THREAD 35: ENDED AT: Wed Jul 28 14:26:37 2021
[PACS] UPACS THREAD 35: TOTAL RUNNING TIME: 0 SECONDS
my lua script is
print("Hello")
print (Data.StudyInstanceUID)
if Data.QueryRetrieveLevel=='STUDY' then
local a = dbquery("DICOMStudies","Studystatu","StudyInsta","StudyInsta='"..Data.StudyInstanceUID.."'")
if (#a==0) then reject() end
print("Value of A is::"..#a)
print ("Status value is:: "..a[1][1])
if (a[1][1]=="B") then print(Data.StudyInstanceUID) end
end
Same error :[PACS] *** lua run error [string "a = dbquery("DICOMStudies", "StudyStatu", "..."]:1: attempt to index field '?' (a nil value) in 'a = dbquery("DICOMStudies", "StudyStatu", "StudyInsta='"..Data.StudyInstanceUID.."'") if a[1][1]=='B' then reject() end;'
I then use the following lua code
if Data.QueryRetrieveLevel=='STUDY' then
local a = dbquery("DICOMStudies","StudyInsta", "Status","StudyInsta='"..Data.StudyInstanceUID.."'")
if #a==0 then reject() end
if a[1][2]=='B' then reject() end
end
[lua]
Association=print("Hello")
QueryConverter0 = dofile('test.lua')
The script worked once. But after restart of the server, its not working as desired.
The first script is giving me error and shows all the records.
dicom.ini file
[lua]
QueryConverter0 = a = dbquery("DICOMStudies", "StudyStatu", "StudyInsta='"..Data.StudyInstanceUID.."'") if a[1][1]=='B' then reject() end;
server log
[PACS] UPACS THREAD 22: STARTED AT: Mon Jul 26 18:05:03 2021
[PACS] Calling Application Title : "RADIANT "
[PACS] Called Application Title : "PACS "
[PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
[PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
[PACS] *** lua run error [string "a = dbquery("DICOMStudies", "StudyStatu", "..."]:1: attempt to index field '?' (a nil value) in 'a = dbquery("DICOMStudies", "StudyStatu", "StudyInsta='"..Data.StudyInstanceUID.."'") if a[1][1]=='B' then reject() end;'
[PACS] (StudyRootQuery) search level: STUDY
[PACS] C-Find (StudyRoot) located 2 records
[PACS] UPACS THREAD 22: ENDED AT: Mon Jul 26 18:05:03 2021
[PACS] UPACS THREAD 22: TOTAL RUNNING TIME: 0 SECONDS
One last thing. Firstly, the images we viewed are saved in the cache of the client PC or we have to manually those studies (please share the location). And secondly, can i open study directly in viewer by providing StudyID like this
Thanks for your help i got it running..
My dicom.ini is :
[lua]
QueryConverter0 = a = dbquery("DICOMStudies", "StudyStatu", "StudyInsta='"..Data.StudyInstanceUID.."'") if a[1][1]=='B' then reject() end;
This is the error log
[PACS] UPACS THREAD 1: STARTED AT: Mon Jul 26 13:30:21 2021
[PACS] Calling Application Title : "RADIANT "
[PACS] Called Application Title : "PACS "
[PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
[PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.2.2.1" 1
[PACS] *** lua run error [string "a = dbquery("DICOMStudies", "StudyStatu", "..."]:1: attempt to index field '?' (a nil value) in 'a = dbquery("DICOMStudies", "StudyStatu", "StudyInsta='"..Data.StudyInstanceUID.."'") if a[1][1]=='B' then reject() end;'
[PACS] (StudyRootQuery) search level: STUDY
[PACS] C-Find (StudyRoot) located 2 records
[PACS] UPACS THREAD 1: ENDED AT: Mon Jul 26 13:30:21 2021
[PACS] UPACS THREAD 1: TOTAL RUNNING TIME: 0 SECONDS
Beside above, i tried to use this but no success:
QueryConverter0 = if (Data["9999,9003"]=='B' ) script('destroy') end;
Please guide
Sorry for the late response .
This is the error :: "[PACS] *** lua run error [string "a=dbquery("DICOMStudies", "StudyStatu","Stu..."]:1: attempt to index global 'a' (a nil value) in 'a=dbquery("DICOMStudies", "StudyStatu","StudyInst='"..(Data.StudyInstanceUID).."'")if a[1][1]=='B' then reject() end;'".
Please correct me where i am wrong.