From 64a74dbbd5c1707df0439b8f9b365fbc8241884a Mon Sep 17 00:00:00 2001 From: Rene Krenn Date: Tue, 27 Feb 2024 19:54:39 +0100 Subject: [PATCH] eCRF field ref UI changes --- .../ctsms/web/model/trial/EcrfFieldBean.java | 2 + .../ctsms/web/util/MessageCodes.java | 1 + .../phoenixctms/ctsms/web/messages.properties | 1 + .../ctsms/web/messages_de.properties | 1 + .../ctsms/web/trial/labels.properties | 5 +++ .../ctsms/web/trial/labels_de.properties | 5 +++ .../META-INF/includes/trial/ecrfField.xhtml | 41 +++++++++++++++++++ 7 files changed, 56 insertions(+) diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldBean.java b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldBean.java index 3fe6ed91ddd2..ea3805f5fb3e 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldBean.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/model/trial/EcrfFieldBean.java @@ -66,6 +66,7 @@ public static void copyEcrfFieldOutToIn(ECRFFieldInVO in, ECRFFieldOutVO out) { in.setJsVariableName(out.getJsVariableName()); in.setJsValueExpression(out.getJsValueExpression()); in.setJsOutputExpression(out.getJsOutputExpression()); + in.setRef(out.getRef()); in.setExternalId(out.getExternalId()); } } @@ -100,6 +101,7 @@ public static void initEcrfFieldDefaultValues(ECRFFieldInVO in, Long trialId, Lo in.setJsVariableName(Messages.getString(MessageCodes.ECRF_FIELD_JS_VARIABLE_NAME_PRESET)); in.setJsValueExpression(Messages.getString(MessageCodes.ECRF_FIELD_JS_VALUE_EXPRESSION_PRESET)); in.setJsOutputExpression(Messages.getString(MessageCodes.ECRF_FIELD_JS_OUTPUT_EXPRESSION_PRESET)); + in.setRef(Messages.getMessage(MessageCodes.ECRF_FIELD_REF_PRESET, CommonUtil.generateShortUUID())); in.setExternalId(Messages.getString(MessageCodes.ECRF_FIELD_EXTERNAL_ID_PRESET)); } } diff --git a/web/src/main/java/org/phoenixctms/ctsms/web/util/MessageCodes.java b/web/src/main/java/org/phoenixctms/ctsms/web/util/MessageCodes.java index d34b23a8d786..62b7840ca0cd 100644 --- a/web/src/main/java/org/phoenixctms/ctsms/web/util/MessageCodes.java +++ b/web/src/main/java/org/phoenixctms/ctsms/web/util/MessageCodes.java @@ -242,6 +242,7 @@ public interface MessageCodes { public static final String ECRF_FIELD_JS_VALUE_EXPRESSION_PRESET = "ecrf_field_js_value_expression_preset"; public static final String ECRF_FIELD_JS_OUTPUT_EXPRESSION_PRESET = "ecrf_field_js_output_expression_preset"; public static final String ECRF_FIELD_EXTERNAL_ID_PRESET = "ecrf_field_external_id_preset"; + public static final String ECRF_FIELD_REF_PRESET = "ecrf_field_ref_preset"; public static final String SELECT_ECRF = "select_ecrf"; public static final String SELECT_PROBAND_LIST_ENTRY = "select_proband_list_entry"; public static final String SELECT_ECRF_FIELD_STATUS_ENTRY = "select_ecrf_field_status_entry"; diff --git a/web/src/main/resources/org/phoenixctms/ctsms/web/messages.properties b/web/src/main/resources/org/phoenixctms/ctsms/web/messages.properties index c954574be7de..7a283ead1bfd 100644 --- a/web/src/main/resources/org/phoenixctms/ctsms/web/messages.properties +++ b/web/src/main/resources/org/phoenixctms/ctsms/web/messages.properties @@ -394,6 +394,7 @@ ecrf_field_js_variable_name_preset= ecrf_field_js_value_expression_preset=//leave this field blank to use entered values directly,\n//or provide a javascript snippet that calculates this\n//variable's value\:\n// - specify involved variables as signature parameters\n// - provide the variable's new value as return value\n// - available special variables\: $enteredValue, $oldValue,\n// $selectionSetValues\n//example\: calculate the Body Mass Index from variables\n//'size' and 'weight'\:\n//function(size,weight) {\n// return weight / (size * size);\n//} ecrf_field_js_output_expression_preset=//leave this field blank if no output is desired, or provide\n//a javascript snippet that assembles a string output\n//to be displayed below user input\:\n// - specify involved variables as signature parameters\n// - provide text/html output as return value\n// - available special variables\: $enteredValue, $oldValue,\n// $selectionSetValues\n//function(bmi) {\n// return sprintf("the BMI value results in\: %.2f",bmi);\n//} ecrf_field_external_id_preset= +ecrf_field_ref_preset={0} select_ecrf=select eCRF select_ecrf_field_status_entry=select eCRF issue diff --git a/web/src/main/resources/org/phoenixctms/ctsms/web/messages_de.properties b/web/src/main/resources/org/phoenixctms/ctsms/web/messages_de.properties index 3b2da56caeb9..19b8b4d8ada0 100644 --- a/web/src/main/resources/org/phoenixctms/ctsms/web/messages_de.properties +++ b/web/src/main/resources/org/phoenixctms/ctsms/web/messages_de.properties @@ -394,6 +394,7 @@ ecrf_field_js_variable_name_preset= ecrf_field_js_value_expression_preset=//leave this field blank to use entered values directly,\n//or provide a javascript snippet that calculates this\n//variable's value\:\n// - specify involved variables as signature parameters\n// - provide the variable's new value as return value\n// - available special variables\: $enteredValue, $oldValue,\n// $selectionSetValues\n//example\: calculate the Body Mass Index from variables\n//'size' and 'weight'\:\n//function(size,weight) {\n// return weight / (size * size);\n//} ecrf_field_js_output_expression_preset=//leave this field blank if no output is desired, or provide\n//a javascript snippet that assembles a string output\n//to be displayed below user input\:\n// - specify involved variables as signature parameters\n// - provide text/html output as return value\n// - available special variables\: $enteredValue, $oldValue,\n// $selectionSetValues\n//function(bmi) {\n// return sprintf("the BMI value results in\: %.2f",bmi);\n//} ecrf_field_external_id_preset= +ecrf_field_ref_preset={0} select_ecrf=eCRF ausw\u00E4hlen select_ecrf_field_status_entry=eCRF Issue ausw\u00E4hlen diff --git a/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels.properties b/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels.properties index 4d8a294d79a0..a36696993035 100644 --- a/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels.properties +++ b/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels.properties @@ -1045,6 +1045,7 @@ ecrffield_ecrffield_list_notify_column=Notify ecrffield_ecrffield_list_external_id_column=External ID ecrffield_ecrffield_list_field_external_id_column=Ext. ID (input field) ecrffield_ecrffield_list_number_of_values_column=#Values +ecrffield_ecrffield_list_ref_column=Reference ecrffield_ecrffield_list_section_column=Section ecrffield_ecrffield_list_series_column=Series ecrffield_ecrffield_list_position_column=Position @@ -1118,6 +1119,10 @@ ecrffield_externalid_label=External ID: ecrffield_externalid=External ID ecrffield_externalid_tooltip=This eCRF field's identifier in data exports. +ecrffield_ref_label=Reference\: +ecrffield_ref=reference +ecrffield_ref_tooltip=This eCRF field's identifier when importing an updated eCRF setup. + ecrffield_field_calculation_js_snippets_field_set=Field value calculation and output ecrffield_js_value_expression_label=Value expression: diff --git a/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels_de.properties b/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels_de.properties index 3e3e1bbf8e40..0d889380b217 100644 --- a/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels_de.properties +++ b/web/src/main/resources/org/phoenixctms/ctsms/web/trial/labels_de.properties @@ -1045,6 +1045,7 @@ ecrffield_ecrffield_list_notify_column=Benachrichtigen ecrffield_ecrffield_list_external_id_column=Externe ID ecrffield_ecrffield_list_field_external_id_column=Ext. ID (Eingabefeld) ecrffield_ecrffield_list_number_of_values_column=#Werte +ecrffield_ecrffield_list_ref_column=Referenz ecrffield_ecrffield_list_section_column=Abschnitt ecrffield_ecrffield_list_series_column=Serie ecrffield_ecrffield_list_position_column=Position @@ -1112,6 +1113,10 @@ ecrffield_externalid_label=Externe ID\: ecrffield_externalid=Externe ID ecrffield_externalid_tooltip=Die Kennzeichnung dieses eCRF Feldes in Datenexports. +ecrffield_ref_label=Referenz\: +ecrffield_ref=Referenz +ecrffield_ref_tooltip=Die Kennzeichnung dieses eCRF Feldes beim Import eines aktualisierten eCRF Setups. + ecrffield_audit_trail_label=Audit Trail\: ecrffield_audit_trail_tooltip=\u00C4nderungen des Eingabefeldwertes aufzeichnen. diff --git a/web/src/main/webapp/META-INF/includes/trial/ecrfField.xhtml b/web/src/main/webapp/META-INF/includes/trial/ecrfField.xhtml index 91da4f809b4e..a65d3492604a 100644 --- a/web/src/main/webapp/META-INF/includes/trial/ecrfField.xhtml +++ b/web/src/main/webapp/META-INF/includes/trial/ecrfField.xhtml @@ -243,6 +243,15 @@ + + + + + + + @@ -749,6 +758,38 @@ + + + + + + + + + + + + + + + + + + +> +