questhaven
Programmer
Hi there - I am trying to figure out how to do something. Below I have included some code I have been working on which takes a list of images and their associated tpNum and deletes them from table individually and logs the deletion.
oldTPNum = ""
'loop through the array which holds the values that were NOT ticked
for i = 0 to ubound(arrInactive)
if arrInactive(i) <> "" then
InActiveimageType = right(arrInactive(i), 3) ' List of imagetypes
InActivenewtpNumber = left(arrInactive(i), 2) ' List of tpnum's associated with imagetypes
if InActiveimageType <> "" then
sql = "exec sql_Record_ShareGetInfo " & InActiveimageType & "," & st.patient_id & "," & InActivenewtpNumber
set rs = conn.execute(sql)
if not rs.eof then
imageType = rs("imageType"
tpNum = rs("tpNumber"
sql = "exec sql_Record_ShareLookupDEL " & shared_userID & "," & st.patient_id & "," & timepointID & "," & image_id & "," & request.form("cmbPermission"
set rs2 = conn.execute(sql)
comment = "image deleted"
call updateLog(image_id, 4, userID, tpNum, comment)
deletedImages = deletedImages & "," & rtrim(imageType)
end if
end if
end if
What I am trying to do it create a list of the imagetypes that are associated with a specific tpNum and insert that list into the log as one record, after I insert them individually. Here is an example of the data I am dealing with:
TPNum = 0 - deleted Images are I10,I20, I30
TPNum = 1 - deleted images are I20, I30, I40
TpNum = 2 - deleted images are I10, I20, I30
(as you can see there can images that are named the same for each tpNum.
I was trying to do this, but it is not working. does anyone have any idea of what I am doing wrong?
if tpNum <> oldTpNum then
comment = "You removed the ""share"" of " & patientName & "'s images " & deletedImages & " from timepointID " & TpNum & " with " & shared_username
call updateLog(image_id, 9, shared_userID, tpNum, comment)
oldTPNum = tpNum
end if
end if
Thanks in advance for nay help!
oldTPNum = ""
'loop through the array which holds the values that were NOT ticked
for i = 0 to ubound(arrInactive)
if arrInactive(i) <> "" then
InActiveimageType = right(arrInactive(i), 3) ' List of imagetypes
InActivenewtpNumber = left(arrInactive(i), 2) ' List of tpnum's associated with imagetypes
if InActiveimageType <> "" then
sql = "exec sql_Record_ShareGetInfo " & InActiveimageType & "," & st.patient_id & "," & InActivenewtpNumber
set rs = conn.execute(sql)
if not rs.eof then
imageType = rs("imageType"
tpNum = rs("tpNumber"
sql = "exec sql_Record_ShareLookupDEL " & shared_userID & "," & st.patient_id & "," & timepointID & "," & image_id & "," & request.form("cmbPermission"
set rs2 = conn.execute(sql)
comment = "image deleted"
call updateLog(image_id, 4, userID, tpNum, comment)
deletedImages = deletedImages & "," & rtrim(imageType)
end if
end if
end if
What I am trying to do it create a list of the imagetypes that are associated with a specific tpNum and insert that list into the log as one record, after I insert them individually. Here is an example of the data I am dealing with:
TPNum = 0 - deleted Images are I10,I20, I30
TPNum = 1 - deleted images are I20, I30, I40
TpNum = 2 - deleted images are I10, I20, I30
(as you can see there can images that are named the same for each tpNum.
I was trying to do this, but it is not working. does anyone have any idea of what I am doing wrong?
if tpNum <> oldTpNum then
comment = "You removed the ""share"" of " & patientName & "'s images " & deletedImages & " from timepointID " & TpNum & " with " & shared_username
call updateLog(image_id, 9, shared_userID, tpNum, comment)
oldTPNum = tpNum
end if
end if
Thanks in advance for nay help!