Hii i am trying to Access ID from the Lua script but i am unable to get it anybody can please help me how to fetch ID
ID which i am talking about is u get when u run the /patients endpoint i want that ID to pass of a specific patient to my backend endpoint Please help me out how can i access the ID and print it
Hey Thanks For the reply but i doesnt want the Patient ID which is in the MainDicomtags
when u run this http://localhost:8042/patients u get the id some thing like this
for example
[
“be597d86-bc4680a0-0fc66573-df03a47c-3f8ec9af”,
“adb6eb74-776e842a-6e964574-b6093b7d-002a6be1”,
“074a4580-e1250961-948e54b1-f36c5842-9eb79e67”,
“c24d636f-ffbb7f05-04cadd13-4754be1a-6248486c”,
“904de6a6-e2da0c20-f5bb7812-e6713ed4-fefb08d8”,
“ac243a0c-25bcfd3e-50231561-3627fcc4-47c094c3”
]
So i want to fetch this id in the Lua scripts
When i tried this i was getting this error in the Orthanc Logs
E1130 13:28:03.681127 LUA-EVENTS LuaScripting.cpp:842] Error while processing Lua events: Cannot execute a Lua command
E1130 13:28:03.685118 LUA-EVENTS LuaScripting.cpp:448] Lua: Error in RestApiGet() for URI: /studies/1.3.12.2.1107.5.2.30.25185.30000024041714450221800000022/parent
E1130 13:28:03.685118 LUA-EVENTS OrthancException.cpp:62] Cannot execute a Lua command: [string “line”]:20: attempt to index a nil value
No, you’ve not tried “this” because “this” would not lead to this error message because the URL you show contains a DICOM UID and not an Orthanc ID like the sample I provided you with.