diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 89ada0dae1e..7f7299353bf 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -240,16 +240,16 @@ ) ui_modal_message(src, "virus", "", null, payload) qdel(D) - if("del_all") + if("del_all_med_records") for(var/datum/data/record/R in GLOB.data_core.medical) qdel(R) set_temp("All medical records deleted.") - if("del_r") + if("del_med_record") if(active2) set_temp("Medical record deleted.") qdel(active2) - if("d_rec") - var/datum/data/record/general_record = locate(params["d_rec"] || "") + if("view_record") + var/datum/data/record/general_record = locate(params["view_record"] || "") if(!GLOB.data_core.general.Find(general_record)) set_temp("Record not found.", "danger") return @@ -263,7 +263,7 @@ active1 = general_record active2 = medical_record screen = MED_DATA_RECORD - if("new") + if("new_med_record") if(istype(active1, /datum/data/record) && !istype(active2, /datum/data/record)) var/datum/data/record/R = new /datum/data/record() R.fields["name"] = active1.fields["name"] @@ -284,8 +284,8 @@ active2 = R screen = MED_DATA_RECORD set_temp("Medical record created.", "success") - if("del_c") - var/index = text2num(params["del_c"] || "") + if("del_comment") + var/index = text2num(params["del_comment"] || "") if(!index || !istype(active2, /datum/data/record)) return @@ -293,26 +293,7 @@ index = clamp(index, 1, length(comments)) if(comments[index]) comments.Cut(index, index + 1) - if("search") - active1 = null - active2 = null - var/t1 = lowertext(params["t1"] || "") - if(!length(t1)) - return - - for(var/datum/data/record/R in GLOB.data_core.medical) - if(t1 == lowertext(R.fields["name"]) || t1 == lowertext(R.fields["id"]) || t1 == lowertext(R.fields["b_dna"])) - active2 = R - break - if(!active2) - set_temp("Medical record not found. You must enter the person's exact name, ID or DNA.", "danger") - return - for(var/datum/data/record/E in GLOB.data_core.general) - if(E.fields["name"] == active2.fields["name"] && E.fields["id"] == active2.fields["id"]) - active1 = E - break - screen = MED_DATA_RECORD - if("print_p") + if("print_record") if(!printing) printing = TRUE playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, TRUE) @@ -345,7 +326,7 @@ ui_modal_choice(src, id, question, arguments = arguments, value = arguments["value"], choices = choices) else ui_modal_input(src, id, question, arguments = arguments, value = arguments["value"]) - if("add_c") + if("add_comment") ui_modal_input(src, id, "Please enter your message:") else return FALSE @@ -371,7 +352,7 @@ active2.fields[field] = answer else if(istype(active1) && (field in active1.fields)) active1.fields[field] = answer - if("add_c") + if("add_comment") var/datum/ui_login/state = ui_login_get() if(!length(answer) || !istype(active2) || !length(state.name)) return @@ -404,11 +385,11 @@
\nBlood Type: [active2.fields["blood_type"]]
\nDNA: [active2.fields["b_dna"]]
\n
\nMinor Disabilities: [active2.fields["mi_dis"]] -
\nDetails: [active2.fields["mi_dis_d"]]
\n +
\nDetails: [active2.fields["mi_dis_d"]]

\nMajor Disabilities: [active2.fields["ma_dis"]]
\nDetails: [active2.fields["ma_dis_d"]]
\n
\nAllergies: [active2.fields["alg"]] -
\nDetails: [active2.fields["alg_d"]]
\n +
\nDetails: [active2.fields["alg_d"]]

\nCurrent Diseases: [active2.fields["cdi"]] (per disease info placed in log/comment section)
\nDetails: [active2.fields["cdi_d"]]
\n
\nImportant Notes: diff --git a/tgui/packages/tgui/interfaces/MedicalRecords.js b/tgui/packages/tgui/interfaces/MedicalRecords.js index cc6eec686bc..792a3161ec4 100644 --- a/tgui/packages/tgui/interfaces/MedicalRecords.js +++ b/tgui/packages/tgui/interfaces/MedicalRecords.js @@ -176,7 +176,7 @@ const MedicalRecordsList = (_properties, context) => { className={ 'MedicalRecords__listRow--' + medStatusStyles[record.p_stat] } - onClick={() => act('d_rec', { d_rec: record.ref })} + onClick={() => act('view_record', { view_record: record.ref })} > {record.name} @@ -209,7 +209,7 @@ const MedicalRecordsMaintenance = (_properties, context) => { act('del_all')} + onClick={() => act('del_all_med_records')} /> ); @@ -231,7 +231,7 @@ const MedicalRecordsView = (_properties, context) => { iconSpin={!!printing} content="Print Entry" ml="0.5rem" - onClick={() => act('print_p')} + onClick={() => act('print_record')} /> }> @@ -244,7 +244,7 @@ const MedicalRecordsView = (_properties, context) => { icon="trash" disabled={!!medical.empty} content="Delete Medical Record" - onClick={() => act('del_r')} + onClick={() => act('del_med_record')} /> }> @@ -316,7 +316,7 @@ const MedicalRecordsViewMedical = (_properties, context) => { icon="pen" content="New Record" ml="0.5rem" - onClick={() => act('new')} + onClick={() => act('new_med_record')} /> ); @@ -343,7 +343,7 @@ const MedicalRecordsViewMedical = (_properties, context) => {