From 2007a15eeaeb10655c96a9602d0ca67498a1ac47 Mon Sep 17 00:00:00 2001 From: RoseLD Date: Tue, 14 Mar 2023 10:45:10 -0600 Subject: [PATCH 01/17] Create populate_i_crm_import_type --- kardia-db/ddl-mysql/populate_i_crm_import_type | 1 + 1 file changed, 1 insertion(+) create mode 100644 kardia-db/ddl-mysql/populate_i_crm_import_type diff --git a/kardia-db/ddl-mysql/populate_i_crm_import_type b/kardia-db/ddl-mysql/populate_i_crm_import_type new file mode 100644 index 00000000..7e0e6174 --- /dev/null +++ b/kardia-db/ddl-mysql/populate_i_crm_import_type @@ -0,0 +1 @@ +INSERT INTO `Kardia_DB`.`i_crm_import_type` (`i_crm_import_type_id`, `i_crm_import_type_desc`, `i_crm_import_type_subsys`, `i_crm_import_type_path`, `i_crm_field_pk`, `i_crm_field_surname`, `i_crm_field_given_name`, `i_crm_field_middle_name`, `i_crm_field_date`, `i_crm_field_org_name`, `i_crm_field_phone`, `i_crm_field_email`, `i_crm_field_addr1`, `i_crm_field_city`, `i_crm_field_stateprov`, `i_crm_field_postal_code`, `i_crm_field_country`, `s_date_created`, `s_created_by`, `s_date_modified`, `s_modified_by`) VALUES ('1', 'email', 'LSAP', 'c:\\', '', 'Rose', 'Lara', 'Dennyse', '', 'LeTourneau University', '903-233-3210', 'roseld07@gmail.com', '7602 FM 3358', 'Griffin', 'GA', '30223', 'USA', '2023-03-14 10:19:00', 'lrose', '2023-03-14 10:19:00', 'lrose'); From e8ceae0e11eb10da0458ad97fa1700b61bcc9778 Mon Sep 17 00:00:00 2001 From: RoseLD Date: Tue, 14 Mar 2023 10:48:56 -0600 Subject: [PATCH 02/17] Update populate_i_crm_import_type --- kardia-db/ddl-mysql/populate_i_crm_import_type | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kardia-db/ddl-mysql/populate_i_crm_import_type b/kardia-db/ddl-mysql/populate_i_crm_import_type index 7e0e6174..82c48b0c 100644 --- a/kardia-db/ddl-mysql/populate_i_crm_import_type +++ b/kardia-db/ddl-mysql/populate_i_crm_import_type @@ -1 +1,2 @@ -INSERT INTO `Kardia_DB`.`i_crm_import_type` (`i_crm_import_type_id`, `i_crm_import_type_desc`, `i_crm_import_type_subsys`, `i_crm_import_type_path`, `i_crm_field_pk`, `i_crm_field_surname`, `i_crm_field_given_name`, `i_crm_field_middle_name`, `i_crm_field_date`, `i_crm_field_org_name`, `i_crm_field_phone`, `i_crm_field_email`, `i_crm_field_addr1`, `i_crm_field_city`, `i_crm_field_stateprov`, `i_crm_field_postal_code`, `i_crm_field_country`, `s_date_created`, `s_created_by`, `s_date_modified`, `s_modified_by`) VALUES ('1', 'email', 'LSAP', 'c:\\', '', 'Rose', 'Lara', 'Dennyse', '', 'LeTourneau University', '903-233-3210', 'roseld07@gmail.com', '7602 FM 3358', 'Griffin', 'GA', '30223', 'USA', '2023-03-14 10:19:00', 'lrose', '2023-03-14 10:19:00', 'lrose'); +use Kardia_DB; +INSERT INTO `Kardia_DB`.`i_crm_import_type` (`i_crm_import_type_id`, `i_crm_import_type_desc`, `i_crm_import_type_subsys`, `i_crm_import_type_path`, `i_crm_field_pk`, `i_crm_field_surname`, `i_crm_field_given_name`, `i_crm_field_middle_name`, `i_crm_field_date`, `i_crm_field_org_name`, `i_crm_field_phone`, `i_crm_field_email`, `i_crm_field_addr1`, `i_crm_field_city`, `i_crm_field_stateprov`, `i_crm_field_postal_code`, `i_crm_field_country`, `s_date_created`, `s_created_by`, `s_date_modified`, `s_modified_by`) VALUES ('1', 'email', 'LSAP', 'c:\\', '', 'Rinehart', 'Randall', 'Stoddard', '', 'LeTourneau University', '903-503-1531', 'randallrinehart@letu.edu', '2100 S. Mobberly Ave', 'Longview', 'TX', '75602', 'USA', '2023-03-14 10:48:00', 'rrinehart', '2023-03-14 10:48:00', 'rrinehart'); From 66e1660054e0a8ee20ebab4e62bcfb6d80f112de Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Mar 2023 14:59:43 -0600 Subject: [PATCH 03/17] Testing that git and github works --- kardia-app/modules/ex_limesurvey/test.qy | 10 ++++++++++ kardia-app/modules/ex_limesurvey/test.txt | 1 + 2 files changed, 11 insertions(+) create mode 100644 kardia-app/modules/ex_limesurvey/test.qy create mode 100644 kardia-app/modules/ex_limesurvey/test.txt diff --git a/kardia-app/modules/ex_limesurvey/test.qy b/kardia-app/modules/ex_limesurvey/test.qy new file mode 100644 index 00000000..b2a19b5c --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/test.qy @@ -0,0 +1,10 @@ +$Version=2$ +test "system/query" + { + sql = " select + :name, + :size + from + /apps/kardia/modules + "; + } diff --git a/kardia-app/modules/ex_limesurvey/test.txt b/kardia-app/modules/ex_limesurvey/test.txt new file mode 100644 index 00000000..af27ff49 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/test.txt @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file From 9c43ff846423adb5e05f05fc27544e08ed1d722b Mon Sep 17 00:00:00 2001 From: RoseLD Date: Tue, 14 Mar 2023 15:33:02 -0600 Subject: [PATCH 04/17] Update populate_i_crm_import_type --- .../ddl-mysql/populate_i_crm_import_type | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/kardia-db/ddl-mysql/populate_i_crm_import_type b/kardia-db/ddl-mysql/populate_i_crm_import_type index 82c48b0c..f6c00857 100644 --- a/kardia-db/ddl-mysql/populate_i_crm_import_type +++ b/kardia-db/ddl-mysql/populate_i_crm_import_type @@ -1,2 +1,37 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " INSERT INTO `Kardia_DB`.`i_crm_import_type` + select + `i_crm_import_type_id`="2", + `i_crm_import_type_desc`="email", + `i_crm_import_type_subsys`="LSAP", + `i_crm_import_type_path`='c:\\', + `i_crm_field_pk`="", + `i_crm_field_surname`='Rinehart', + `i_crm_field_given_name`='Randall", + `i_crm_field_middle_name`='Stoddard', + `i_crm_field_date`, + `i_crm_field_org_name`='LeTourneau University', + `i_crm_field_phone`='903-503-1531', + `i_crm_field_email`='randallrinehart@letu.edu', + `i_crm_field_addr1`='2100 S. Mobberly Ave', + `i_crm_field_city`='Longview', + `i_crm_field_stateprov`='TX', + `i_crm_field_postal_code`='75602', + `i_crm_field_country`='USA', + `s_date_created`='2023-03-14 10:48:00', + `s_created_by`='rrinehart', + `s_date_modified`='2023-03-14 10:48:00', + `s_modified_by`= 'rrinehart' + "; + } +/* INSERT INTO /data/table.csv/rows + SELECT first_name="John", last_name="Doe", phone_number="555-1212" +/* +/* use Kardia_DB; INSERT INTO `Kardia_DB`.`i_crm_import_type` (`i_crm_import_type_id`, `i_crm_import_type_desc`, `i_crm_import_type_subsys`, `i_crm_import_type_path`, `i_crm_field_pk`, `i_crm_field_surname`, `i_crm_field_given_name`, `i_crm_field_middle_name`, `i_crm_field_date`, `i_crm_field_org_name`, `i_crm_field_phone`, `i_crm_field_email`, `i_crm_field_addr1`, `i_crm_field_city`, `i_crm_field_stateprov`, `i_crm_field_postal_code`, `i_crm_field_country`, `s_date_created`, `s_created_by`, `s_date_modified`, `s_modified_by`) VALUES ('1', 'email', 'LSAP', 'c:\\', '', 'Rinehart', 'Randall', 'Stoddard', '', 'LeTourneau University', '903-503-1531', 'randallrinehart@letu.edu', '2100 S. Mobberly Ave', 'Longview', 'TX', '75602', 'USA', '2023-03-14 10:48:00', 'rrinehart', '2023-03-14 10:48:00', 'rrinehart'); +*/ From 0faac85d7f671414768d83b8283acd906f3b1f6e Mon Sep 17 00:00:00 2001 From: RoseLD Date: Tue, 14 Mar 2023 15:39:23 -0600 Subject: [PATCH 05/17] Create ldr_test_insert_i_crm_import_type --- .../ldr_test_insert_i_crm_import_type | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 kardia-app/modules/ex_limesurvey/ldr_test_insert_i_crm_import_type diff --git a/kardia-app/modules/ex_limesurvey/ldr_test_insert_i_crm_import_type b/kardia-app/modules/ex_limesurvey/ldr_test_insert_i_crm_import_type new file mode 100644 index 00000000..a2e4d48a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_test_insert_i_crm_import_type @@ -0,0 +1,30 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " INSERT INTO `Kardia_DB`.`i_crm_import_type` + select + `i_crm_import_type_id`="2", + `i_crm_import_type_desc`="email", + `i_crm_import_type_subsys`="LSAP", + `i_crm_import_type_path`='c:\\', + `i_crm_field_pk`="", + `i_crm_field_surname`='Rinehart', + `i_crm_field_given_name`='Randall", + `i_crm_field_middle_name`='Stoddard', + `i_crm_field_date`, + `i_crm_field_org_name`='LeTourneau University', + `i_crm_field_phone`='903-503-1531', + `i_crm_field_email`='randallrinehart@letu.edu', + `i_crm_field_addr1`='2100 S. Mobberly Ave', + `i_crm_field_city`='Longview', + `i_crm_field_stateprov`='TX', + `i_crm_field_postal_code`='75602', + `i_crm_field_country`='USA', + `s_date_created`='2023-03-14 10:48:00', + `s_created_by`='rrinehart', + `s_date_modified`='2023-03-14 10:48:00', + `s_modified_by`= 'rrinehart' + "; + } From 37b31a240fe09acdcfa839ebca60a4753f168bfd Mon Sep 17 00:00:00 2001 From: RoseLD Date: Tue, 14 Mar 2023 16:13:42 -0600 Subject: [PATCH 06/17] Rename ldr_test_insert_i_crm_import_type to ldr_test.qy --- .../{ldr_test_insert_i_crm_import_type => ldr_test.qy} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename kardia-app/modules/ex_limesurvey/{ldr_test_insert_i_crm_import_type => ldr_test.qy} (100%) diff --git a/kardia-app/modules/ex_limesurvey/ldr_test_insert_i_crm_import_type b/kardia-app/modules/ex_limesurvey/ldr_test.qy similarity index 100% rename from kardia-app/modules/ex_limesurvey/ldr_test_insert_i_crm_import_type rename to kardia-app/modules/ex_limesurvey/ldr_test.qy From d1d47bb5dfc19fa591f3591e4219e3ea5e61460f Mon Sep 17 00:00:00 2001 From: e4494s <61923287+e4494s@users.noreply.github.com> Date: Tue, 14 Mar 2023 17:38:01 -0500 Subject: [PATCH 07/17] Create test_update_rsr.qy --- .../modules/ex_limesurvey/test_update_rsr.qy | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 kardia-app/modules/ex_limesurvey/test_update_rsr.qy diff --git a/kardia-app/modules/ex_limesurvey/test_update_rsr.qy b/kardia-app/modules/ex_limesurvey/test_update_rsr.qy new file mode 100644 index 00000000..6639d418 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/test_update_rsr.qy @@ -0,0 +1,14 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " UPDATE + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows + SET + :i_crm_field_email = "lararose@letu.edu" + WHERE + :i_crm_import_type_id = 1 + ; + "; +} From 0fdca35227ce332eaf7fdcd83b2da984eaf4197e Mon Sep 17 00:00:00 2001 From: e4494s <61923287+e4494s@users.noreply.github.com> Date: Tue, 14 Mar 2023 17:58:34 -0500 Subject: [PATCH 08/17] Create test_select_rsr.qy --- kardia-app/modules/ex_limesurvey/test_select_rsr.qy | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 kardia-app/modules/ex_limesurvey/test_select_rsr.qy diff --git a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy new file mode 100644 index 00000000..1e6c9df5 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy @@ -0,0 +1,12 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " SELECT + * + FROM + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows + ; + "; +} From 90721981979991102f05e71dece2a84316c6975d Mon Sep 17 00:00:00 2001 From: e4494s <61923287+e4494s@users.noreply.github.com> Date: Tue, 14 Mar 2023 18:05:58 -0500 Subject: [PATCH 09/17] Update test_select_rsr.qy --- kardia-app/modules/ex_limesurvey/test_select_rsr.qy | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy index 1e6c9df5..61355a52 100644 --- a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy +++ b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy @@ -1,12 +1,10 @@ $Version=2$ myquery "system/query" { - id "query/parameter" { type=integer; } - sql = " SELECT - * - FROM - /apps/kardia/data/Kardia_DB/i_crm_import_type/rows - ; + * + FROM + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows + ; "; } From e6b95ed867bd92901d3ff086a2590103c1b47c94 Mon Sep 17 00:00:00 2001 From: e4494s <61923287+e4494s@users.noreply.github.com> Date: Tue, 14 Mar 2023 18:52:20 -0500 Subject: [PATCH 10/17] Update test_select_rsr.qy --- kardia-app/modules/ex_limesurvey/test_select_rsr.qy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy index 61355a52..48d1013f 100644 --- a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy +++ b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy @@ -4,7 +4,7 @@ myquery "system/query" sql = " SELECT * FROM - /apps/kardia/data/Kardia_DB/i_crm_import_type/rows + /apps/kardia/modules/ex_limesurvey/Kardia_DB_test/i_crm_import_type/rows ; "; } From 6cf87a04b0ef510c7b2f66ed7ecb99eaa8d0f041 Mon Sep 17 00:00:00 2001 From: e4494s <61923287+e4494s@users.noreply.github.com> Date: Tue, 14 Mar 2023 19:01:14 -0500 Subject: [PATCH 11/17] Update test_select_rsr.qy --- kardia-app/modules/ex_limesurvey/test_select_rsr.qy | 1 - 1 file changed, 1 deletion(-) diff --git a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy index 48d1013f..566a0829 100644 --- a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy +++ b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy @@ -5,6 +5,5 @@ myquery "system/query" * FROM /apps/kardia/modules/ex_limesurvey/Kardia_DB_test/i_crm_import_type/rows - ; "; } From 2ee9b26ed928c6923a294e0b874eddd705cee957 Mon Sep 17 00:00:00 2001 From: Developer - Kardia Date: Thu, 16 Mar 2023 10:28:51 -0600 Subject: [PATCH 12/17] Added authentication http object and test qy files --- .../modules/ex_limesurvey/Kardia_DB_test | 16 ++++++ kardia-app/modules/ex_limesurvey/connect.qy | 14 +++++ kardia-app/modules/ex_limesurvey/get_key.http | 52 +++++++++++++++++++ kardia-app/modules/ex_limesurvey/ldr.qy | 30 +++++++++++ kardia-app/modules/ex_limesurvey/ldr_s.qy | 11 ++++ .../modules/ex_limesurvey/ldr_select.qy | 30 +++++++++++ .../modules/ex_limesurvey/test_select_rsr.qy | 1 - 7 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 kardia-app/modules/ex_limesurvey/Kardia_DB_test create mode 100644 kardia-app/modules/ex_limesurvey/connect.qy create mode 100644 kardia-app/modules/ex_limesurvey/get_key.http create mode 100644 kardia-app/modules/ex_limesurvey/ldr.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_s.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_select.qy diff --git a/kardia-app/modules/ex_limesurvey/Kardia_DB_test b/kardia-app/modules/ex_limesurvey/Kardia_DB_test new file mode 100644 index 00000000..d2fbe1a4 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/Kardia_DB_test @@ -0,0 +1,16 @@ +$Version=2$ +Kardia_DB "application/mysql" + { + server = "localhost"; + database = "Kardia_DB"; + max_connections = 200; + annot_table = "ra"; + + // Use centrallix login credentials. + use_system_auth = "no"; + + // Migrate centrallix password to mysql password. + username="root"; + password=""; + + } diff --git a/kardia-app/modules/ex_limesurvey/connect.qy b/kardia-app/modules/ex_limesurvey/connect.qy new file mode 100644 index 00000000..c603f32f --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/connect.qy @@ -0,0 +1,14 @@ +$Version=2$ + +{ + sql = "select, + +from + + + +where + + +"; +} diff --git a/kardia-app/modules/ex_limesurvey/get_key.http b/kardia-app/modules/ex_limesurvey/get_key.http new file mode 100644 index 00000000..3815d789 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/get_key.http @@ -0,0 +1,52 @@ +// Get the API key to make limesurevy API calls +$Version=2$ + +// Intial stuff that is requrided by Kardia +// Set up to do the API call +get_key "application/http" + { + server = "10.5.128.100"; // server address + path = "lsv3/index.php/admin/remotecontrol"; // direcory + protocol = "https"; + method = "GET"; + allowsubdirs = 0; + cache_min_ttl = 3600000; // one hour + cache_max_ttl = 86400000; // one day + } + +// Sefisfie the method name to use in the API call +method "http/parameter" { + type=string; + usage=post; + source=none; + default="get_session_key"; // method name +} + +// List of peramters +// The syntaxt is params.PRAMTER_VALUE +// parmerter 1 +// This is the user name +"params.devel" "http/parameter" { + type=string; + usage=post; + source=none; + default="value 0"; +} +//peramter 2 +// This is the password +"params.fuel-pull-lieu" "http/parameter" { + type=string; + usage=post; + source=none; + default="value 1"; +} +//pamerter 3 +// default that exists +id "http/parameter" { + type=integer; + usage=post; + source=none; + default=1; +} + +// Should output { "method":"get_session_key", "params":["USERNAME", "PASSWORD"], "id":1 } diff --git a/kardia-app/modules/ex_limesurvey/ldr.qy b/kardia-app/modules/ex_limesurvey/ldr.qy new file mode 100644 index 00000000..a2e4d48a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr.qy @@ -0,0 +1,30 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " INSERT INTO `Kardia_DB`.`i_crm_import_type` + select + `i_crm_import_type_id`="2", + `i_crm_import_type_desc`="email", + `i_crm_import_type_subsys`="LSAP", + `i_crm_import_type_path`='c:\\', + `i_crm_field_pk`="", + `i_crm_field_surname`='Rinehart', + `i_crm_field_given_name`='Randall", + `i_crm_field_middle_name`='Stoddard', + `i_crm_field_date`, + `i_crm_field_org_name`='LeTourneau University', + `i_crm_field_phone`='903-503-1531', + `i_crm_field_email`='randallrinehart@letu.edu', + `i_crm_field_addr1`='2100 S. Mobberly Ave', + `i_crm_field_city`='Longview', + `i_crm_field_stateprov`='TX', + `i_crm_field_postal_code`='75602', + `i_crm_field_country`='USA', + `s_date_created`='2023-03-14 10:48:00', + `s_created_by`='rrinehart', + `s_date_modified`='2023-03-14 10:48:00', + `s_modified_by`= 'rrinehart' + "; + } diff --git a/kardia-app/modules/ex_limesurvey/ldr_s.qy b/kardia-app/modules/ex_limesurvey/ldr_s.qy new file mode 100644 index 00000000..c4ab9acb --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_s.qy @@ -0,0 +1,11 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " select + * + from + identity /apps/kardia/data/Kardia_DB.i_crm_import_type/rows + "; + } diff --git a/kardia-app/modules/ex_limesurvey/ldr_select.qy b/kardia-app/modules/ex_limesurvey/ldr_select.qy new file mode 100644 index 00000000..a2e4d48a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_select.qy @@ -0,0 +1,30 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = " INSERT INTO `Kardia_DB`.`i_crm_import_type` + select + `i_crm_import_type_id`="2", + `i_crm_import_type_desc`="email", + `i_crm_import_type_subsys`="LSAP", + `i_crm_import_type_path`='c:\\', + `i_crm_field_pk`="", + `i_crm_field_surname`='Rinehart', + `i_crm_field_given_name`='Randall", + `i_crm_field_middle_name`='Stoddard', + `i_crm_field_date`, + `i_crm_field_org_name`='LeTourneau University', + `i_crm_field_phone`='903-503-1531', + `i_crm_field_email`='randallrinehart@letu.edu', + `i_crm_field_addr1`='2100 S. Mobberly Ave', + `i_crm_field_city`='Longview', + `i_crm_field_stateprov`='TX', + `i_crm_field_postal_code`='75602', + `i_crm_field_country`='USA', + `s_date_created`='2023-03-14 10:48:00', + `s_created_by`='rrinehart', + `s_date_modified`='2023-03-14 10:48:00', + `s_modified_by`= 'rrinehart' + "; + } diff --git a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy index 48d1013f..566a0829 100644 --- a/kardia-app/modules/ex_limesurvey/test_select_rsr.qy +++ b/kardia-app/modules/ex_limesurvey/test_select_rsr.qy @@ -5,6 +5,5 @@ myquery "system/query" * FROM /apps/kardia/modules/ex_limesurvey/Kardia_DB_test/i_crm_import_type/rows - ; "; } From 69a1f16c447ff1d675f4052ccdd6923cd054147d Mon Sep 17 00:00:00 2001 From: Developer - Kardia Date: Thu, 16 Mar 2023 14:52:13 -0600 Subject: [PATCH 13/17] Fixed get_key.http --- kardia-app/modules/ex_limesurvey/get_key.http | 77 ++++++++++--------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/kardia-app/modules/ex_limesurvey/get_key.http b/kardia-app/modules/ex_limesurvey/get_key.http index 3815d789..7e1d6489 100644 --- a/kardia-app/modules/ex_limesurvey/get_key.http +++ b/kardia-app/modules/ex_limesurvey/get_key.http @@ -4,49 +4,52 @@ $Version=2$ // Intial stuff that is requrided by Kardia // Set up to do the API call get_key "application/http" - { +{ server = "10.5.128.100"; // server address - path = "lsv3/index.php/admin/remotecontrol"; // direcory + path = "lsv3/index.php/admin/remotecontrol/"; // direcory protocol = "https"; - method = "GET"; - allowsubdirs = 0; + method = "POST"; + allowsubdirs = 1; cache_min_ttl = 3600000; // one hour cache_max_ttl = 86400000; // one day - } + request_content_type="application/json"; -// Sefisfie the method name to use in the API call -method "http/parameter" { - type=string; - usage=post; - source=none; - default="get_session_key"; // method name -} -// List of peramters -// The syntaxt is params.PRAMTER_VALUE -// parmerter 1 -// This is the user name -"params.devel" "http/parameter" { - type=string; - usage=post; - source=none; - default="value 0"; -} -//peramter 2 -// This is the password -"params.fuel-pull-lieu" "http/parameter" { - type=string; - usage=post; - source=none; - default="value 1"; -} -//pamerter 3 -// default that exists -id "http/parameter" { - type=integer; - usage=post; - source=none; - default=1; + // Sefisfie the method name to use in the API call + method "http/parameter" { + type=string; + usage=post; + source=none; + default="get_session_key"; // method name + } + + // List of peramters + // The syntaxt is params.PRAMTER_VALUE + // parmerter 1 + // This is the user name + "params.0" "http/parameter" { + type=string; + usage=post; + source=none; + default="admin"; + } + //peramter 2 + // This is the password + "params.1" "http/parameter" { + type=string; + usage=post; + source=none; + default="fuel-pull-lieu"; + } + //pamerter 3 + // default that exists + id "http/parameter" { + type=integer; + usage=post; + source=none; + default=1; + } } // Should output { "method":"get_session_key", "params":["USERNAME", "PASSWORD"], "id":1 } +// data='{\"method\":\"get_session_key\",\"params\":[\"admin\",\"fuel-pull-lieu\"],\"id\":1}') From 7564b6b2a60cb622e62be5121e576bbba4c414ac Mon Sep 17 00:00:00 2001 From: Developer - Kardia Date: Thu, 16 Mar 2023 21:15:45 -0600 Subject: [PATCH 14/17] Adding connect.qy get_survery_response.http, hard coded test json files and insert qy files --- kardia-app/modules/ex_limesurvey/422914.json | 388 ++++++++++++++ kardia-app/modules/ex_limesurvey/726131.json | 1 + kardia-app/modules/ex_limesurvey/connect.qy | 25 +- kardia-app/modules/ex_limesurvey/firstname.qy | 11 + .../modules/ex_limesurvey/get_key.http~ | 6 + .../ex_limesurvey/get_list_of_survey.http | 55 ++ .../ex_limesurvey/get_list_of_survey.http~ | 45 ++ .../ex_limesurvey/get_survey_responses.http | 94 ++++ .../ex_limesurvey/get_survey_responses.http~ | 76 +++ .../modules/ex_limesurvey/gregconnect.qy | 26 + .../modules/ex_limesurvey/import_insert.qy | 51 ++ .../ex_limesurvey/james_import_insert.qy | 47 ++ .../ex_limesurvey/james_import_insert.qy~ | 49 ++ kardia-app/modules/ex_limesurvey/ldr_i.qy | 29 ++ kardia-app/modules/ex_limesurvey/ldr_s.qy | 2 +- .../modules/ex_limesurvey/ldr_s_joined.qy | 12 + .../ex_limesurvey/ldr_select_comment.qy | 15 + kardia-app/modules/ex_limesurvey/ldr_u.qy | 12 + .../modules/ex_limesurvey/ldr_u_comment.qy | 12 + .../modules/ex_limesurvey/ldr_u_org_name.qy | 12 + .../modules/ex_limesurvey/ldr_u_phone.qy | 12 + kardia-app/modules/ex_limesurvey/lr.txt | 1 + kardia-app/modules/ex_limesurvey/lsv3.qy | 0 .../modules/ex_limesurvey/newNewtestJSON.json | 492 ++++++++++++++++++ .../modules/ex_limesurvey/newconnect.qy | 25 + kardia-app/modules/ex_limesurvey/phone.qy | 10 + .../modules/ex_limesurvey/phonefinal.qy | 11 + .../modules/ex_limesurvey/phonenumber.qy | 15 + .../ex_limesurvey/rsr_select_comment.qy | 15 + kardia-app/modules/ex_limesurvey/sk.qy | 0 kardia-app/modules/ex_limesurvey/srk | 0 kardia-app/modules/ex_limesurvey/srk.qy | 33 ++ kardia-app/modules/ex_limesurvey/testing.qy | 8 + .../modules/ex_limesurvey/testjson.json | 309 +++++++++++ .../modules/ex_limesurvey/testprogram.qy | 9 + kardia-db/ddl-mysql/tables_create.sql | 17 +- 36 files changed, 1916 insertions(+), 9 deletions(-) create mode 100644 kardia-app/modules/ex_limesurvey/422914.json create mode 100644 kardia-app/modules/ex_limesurvey/726131.json create mode 100644 kardia-app/modules/ex_limesurvey/firstname.qy create mode 100644 kardia-app/modules/ex_limesurvey/get_key.http~ create mode 100644 kardia-app/modules/ex_limesurvey/get_list_of_survey.http create mode 100644 kardia-app/modules/ex_limesurvey/get_list_of_survey.http~ create mode 100644 kardia-app/modules/ex_limesurvey/get_survey_responses.http create mode 100644 kardia-app/modules/ex_limesurvey/get_survey_responses.http~ create mode 100644 kardia-app/modules/ex_limesurvey/gregconnect.qy create mode 100644 kardia-app/modules/ex_limesurvey/import_insert.qy create mode 100644 kardia-app/modules/ex_limesurvey/james_import_insert.qy create mode 100644 kardia-app/modules/ex_limesurvey/james_import_insert.qy~ create mode 100644 kardia-app/modules/ex_limesurvey/ldr_i.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_s_joined.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_select_comment.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_u.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_u_comment.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_u_org_name.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_u_phone.qy create mode 100644 kardia-app/modules/ex_limesurvey/lr.txt create mode 100644 kardia-app/modules/ex_limesurvey/lsv3.qy create mode 100644 kardia-app/modules/ex_limesurvey/newNewtestJSON.json create mode 100644 kardia-app/modules/ex_limesurvey/newconnect.qy create mode 100644 kardia-app/modules/ex_limesurvey/phone.qy create mode 100644 kardia-app/modules/ex_limesurvey/phonefinal.qy create mode 100644 kardia-app/modules/ex_limesurvey/phonenumber.qy create mode 100644 kardia-app/modules/ex_limesurvey/rsr_select_comment.qy create mode 100644 kardia-app/modules/ex_limesurvey/sk.qy create mode 100644 kardia-app/modules/ex_limesurvey/srk create mode 100644 kardia-app/modules/ex_limesurvey/srk.qy create mode 100644 kardia-app/modules/ex_limesurvey/testing.qy create mode 100644 kardia-app/modules/ex_limesurvey/testjson.json create mode 100644 kardia-app/modules/ex_limesurvey/testprogram.qy diff --git a/kardia-app/modules/ex_limesurvey/422914.json b/kardia-app/modules/ex_limesurvey/422914.json new file mode 100644 index 00000000..42d93b42 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/422914.json @@ -0,0 +1,388 @@ +{ + "responses": [ + { + "2": { + "id": "2", + "submitdate": "2023-03-16 23:06:52", + "lastpage": "2", + "startlanguage": "en", + "seed": "2009262542", + "startdate": "2023-03-16 22:59:54", + "datestamp": "2023-03-16 23:06:51", + "ipaddr": "10.5.14.0", + "A01[SQ001]": "Benedict Cumberbatch", + "A01[SQ002]": "Napoleon", + "A01[SQ003]": "4455 Lousy Lane", + "A01[SQ008]": "2100 Daffodil Street", + "A01[SQ004]": "10001110010", + "A01[SQ005]": "csstudentsneedfriends@letu.edu", + "A01[SQ006]": "Reykjavic University", + "A01[SQ007]": "5230", + "A16": "N", + "A09": "A1", + "A02[SQ001]": "Benedict Arnold", + "A02[SQ002]": "BA18F", + "A02[SQ003]": "eggs@salmonella.net", + "A02[SQ004]": "Great Uncle", + "A03": "A2", + "A04": "A4", + "A04[comment]": "I like trains", + "A05": "1000 years from now", + "A06": "50 years ago", + "A07[SQ001]": "Y", + "A07[SQ001comment]": "I can't eat food", + "A07[SQ002]": "Y", + "A07[SQ002comment]": "", + "A07[SQ003]": "Y", + "A07[SQ003comment]": "I never sleep", + "A07[SQ004]": "Y", + "A07[SQ004comment]": "Allergic to air", + "A07[SQ005]": "Y", + "A07[SQ005comment]": "Can't be around light", + "A15": "", + "A12": "A4", + "A12[comment]": "I've done it before. Summer camp was harsh in the 80's", + "A08": "Ubuntian", + "ROLE": "A4", + "ROLE[other]": "", + "r493q0": "As long as they're a fish, I'm fine. ", + "A10": "Anyone hacking into the CIA", + "Aif1": "A3", + "A13": "A2", + "A17": "A8", + "REFRESH[SQ001]": "Y", + "REFRESH[SQ002]": "Y", + "REFRESH[SQ003]": "", + "REFRESH[SQ004]": "", + "REFRESH[SQ005]": "Y", + "REFRESH[SQ012]": "", + "REFRESH[SQ006]": "Y", + "REFRESH[SQ007]": "", + "REFRESH[SQ008]": "", + "REFRESH[SQ009]": "Y", + "REFRESH[SQ010]": "Y", + "REFRESH[SQ011]": "Y", + "REFRESH[other]": "", + "MISSINT": "M1", + "MISSINT[other]": "", + "CAUTION[SQ001]": "", + "OTHERINT[SQ001]": "Y", + "OTHERINT[SQ001comment]": "White Water Rafting", + "OTHERINT[SQ002]": "Y", + "OTHERINT[SQ002comment]": "I play a pretty good theremin", + "B01[SQ002]": "NO", + "B01[SQ003]": "NO", + "B01[SQ019]": "NO", + "B01[SQ005]": "NO", + "B01[SQ006]": "NO", + "B01[SQ016]": "NO", + "B01[SQ020]": "NO", + "B01[SQ007]": "NO", + "B01[SQ017]": "NO", + "B01[SQ010]": "NO", + "B01[SQ014]": "NO", + "B01[SQ011]": "NO", + "B01[SQ021]": "NO", + "B01[SQ012]": "NO", + "B02[SQ004]": "NO", + "B02[SQ005]": "NO", + "B02[SQ006]": "NO", + "B02[SQ018]": "NO", + "B02[SQ007]": "NO", + "B02[SQ008]": "NO", + "B02[SQ009]": "NO", + "B02[SQ011]": "NO", + "B02[SQ012]": "NO", + "B02[SQ015]": "NO", + "B02[SQ016]": "NO", + "B02[SQ017]": "NO", + "B05[WI]": "NO", + "B05[MA]": "NO", + "B05[LI]": "NO", + "B05[AN]": "NO", + "B05[IO]": "NO", + "B05[AP]": "NO", + "B05[IP]": "NO", + "B05[OT]": "NO", + "B03[SQ001]": "NO", + "B03[SQ002]": "NO", + "B03[SQ003]": "NO", + "B03[SQ004]": "NO", + "B03[SQ005]": "NO", + "B03[SQ006]": "NO", + "B03[SQ007]": "NO", + "B03[SQ008]": "NO", + "B03[SQ009]": "NO", + "B03[SQ010]": "NO", + "B03[SQ011]": "NO", + "B03[SQ012]": "NO", + "B03[SQ013]": "NO", + "B03[SQ014]": "NO", + "B03[SQ015]": "NO", + "B03[SQ016]": "NO", + "B03[SQ017]": "NO", + "B03[SQ018]": "NO", + "B04": "Klingon", + "A14": "", + "A13a": "A3", + "agreement[SQ001]": "Y" + } + }, + { + "3": { + "id": "3", + "submitdate": "2023-03-16 23:11:50", + "lastpage": "2", + "startlanguage": "en", + "seed": "811698868", + "startdate": "2023-03-16 23:01:06", + "datestamp": "2023-03-16 23:11:50", + "ipaddr": "10.5.13.157", + "A01[SQ001]": "Joaquin Phoenix", + "A01[SQ002]": "Joker", + "A01[SQ003]": " 8242 Caravel Drive, Colorado Springs, Colorado, 80920-4409", + "A01[SQ008]": "2100 S Mobberly Avenue, Longview, TX, 75602", + "A01[SQ004]": "1-(719)-233-3000", + "A01[SQ005]": "jamessalazar@letu.edu", + "A01[SQ006]": "LeTourneau University", + "A01[SQ007]": "300", + "A16": "N", + "A09": "A2", + "A02[SQ001]": "Dr. Glyn Gowing", + "A02[SQ002]": "N\/A", + "A02[SQ003]": "n\/A", + "A02[SQ004]": "Advisor", + "A03": "A3", + "A04": "A6", + "A04[comment]": "I will walk.", + "A05": "Sunday, March 12th, 7:04 A.M.", + "A06": "Never", + "A07[SQ001]": "Y", + "A07[SQ001comment]": "", + "A07[SQ002]": "Y", + "A07[SQ002comment]": "Why is this even here?", + "A07[SQ003]": "Y", + "A07[SQ003comment]": "This one also does not have a \"please describe\" section...", + "A07[SQ004]": "Y", + "A07[SQ004comment]": "", + "A07[SQ005]": "Y", + "A07[SQ005comment]": "", + "A15": "Y", + "A12": "A4", + "A12[comment]": "thisissparta.mp4", + "A08": "FEDORAFEDORAFEDORAFEDORAFEDORA", + "ROLE": "-oth-", + "ROLE[other]": "Coding Overlord", + "r493q0": "Which do I prefer? I hardly know'er!", + "A10": "The cool one, obviously.", + "Aif1": "A2", + "A13": "A2", + "A17": "A6", + "REFRESH[SQ001]": "", + "REFRESH[SQ002]": "", + "REFRESH[SQ003]": "", + "REFRESH[SQ004]": "", + "REFRESH[SQ005]": "", + "REFRESH[SQ012]": "", + "REFRESH[SQ006]": "", + "REFRESH[SQ007]": "", + "REFRESH[SQ008]": "", + "REFRESH[SQ009]": "", + "REFRESH[SQ010]": "", + "REFRESH[SQ011]": "", + "REFRESH[other]": "Monster", + "MISSINT": "-oth-", + "MISSINT[other]": "", + "CAUTION[SQ001]": "", + "OTHERINT[SQ001]": "Y", + "OTHERINT[SQ001comment]": "Sketchy Manitou Springs Water", + "OTHERINT[SQ002]": "", + "OTHERINT[SQ002comment]": "", + "B01[SQ002]": "Y4", + "B01[SQ003]": "Y3", + "B01[SQ019]": "Y3", + "B01[SQ005]": "Y4", + "B01[SQ006]": "Y4", + "B01[SQ016]": "Y2", + "B01[SQ020]": "Y2", + "B01[SQ007]": "Y4", + "B01[SQ017]": "Y2", + "B01[SQ010]": "Y4", + "B01[SQ014]": "Y4", + "B01[SQ011]": "Y2", + "B01[SQ021]": "Y2", + "B01[SQ012]": "Y4", + "B02[SQ004]": "Y4", + "B02[SQ005]": "Y4", + "B02[SQ006]": "Y4", + "B02[SQ018]": "Y4", + "B02[SQ007]": "Y4", + "B02[SQ008]": "Y4", + "B02[SQ009]": "Y4", + "B02[SQ011]": "Y4", + "B02[SQ012]": "Y4", + "B02[SQ015]": "Y4", + "B02[SQ016]": "Y4", + "B02[SQ017]": "Y4", + "B05[WI]": "NO", + "B05[MA]": "NO", + "B05[LI]": "Y4", + "B05[AN]": "NO", + "B05[IO]": "NO", + "B05[AP]": "Y2", + "B05[IP]": "NO", + "B05[OT]": "Y4", + "B03[SQ001]": "Y2", + "B03[SQ002]": "Y2", + "B03[SQ003]": "Y2", + "B03[SQ004]": "Y4", + "B03[SQ005]": "Y2", + "B03[SQ006]": "Y2", + "B03[SQ007]": "Y2", + "B03[SQ008]": "Y2", + "B03[SQ009]": "Y2", + "B03[SQ010]": "Y2", + "B03[SQ011]": "Y1", + "B03[SQ012]": "Y3", + "B03[SQ013]": "Y2", + "B03[SQ014]": "Y2", + "B03[SQ015]": "NO", + "B03[SQ016]": "Y4", + "B03[SQ017]": "Y2", + "B03[SQ018]": "Y2", + "B04": "Jank VMs", + "A14": "", + "A13a": "A1", + "agreement[SQ001]": "Y" + } + }, + { + "4": { + "id": "4", + "submitdate": "2023-03-16 23:13:55", + "lastpage": "2", + "startlanguage": "en", + "seed": "1632097795", + "startdate": "2023-03-16 23:10:09", + "datestamp": "2023-03-16 23:13:55", + "ipaddr": "10.5.14.5", + "A01[SQ001]": "Lara Rose", + "A01[SQ002]": "LadyBug", + "A01[SQ003]": "South Hamilton", + "A01[SQ008]": "South Hamilton", + "A01[SQ004]": "6077689205", + "A01[SQ005]": "lararose@letu.edu", + "A01[SQ006]": "LeTourneau University", + "A01[SQ007]": "1991", + "A16": "Y", + "A09": "A1", + "A02[SQ001]": "Dan Rose", + "A02[SQ002]": "607-768-5223", + "A02[SQ003]": "pvcman01@gmail.com", + "A02[SQ004]": "spouse", + "A03": "A3", + "A04": "A2", + "A04[comment]": "", + "A05": "8:10 PM", + "A06": "Saturday morning", + "A07[SQ001]": "", + "A07[SQ001comment]": "", + "A07[SQ002]": "Y", + "A07[SQ002comment]": "", + "A07[SQ003]": "", + "A07[SQ003comment]": "", + "A07[SQ004]": "", + "A07[SQ004comment]": "", + "A07[SQ005]": "", + "A07[SQ005comment]": "", + "A15": "Y", + "A12": "A1", + "A12[comment]": "", + "A08": "Windows 10", + "ROLE": "A2", + "ROLE[other]": "", + "r493q0": "", + "A10": "", + "Aif1": "A4", + "A13": "A1", + "A17": "A2", + "REFRESH[SQ001]": "Y", + "REFRESH[SQ002]": "Y", + "REFRESH[SQ003]": "Y", + "REFRESH[SQ004]": "Y", + "REFRESH[SQ005]": "Y", + "REFRESH[SQ012]": "", + "REFRESH[SQ006]": "", + "REFRESH[SQ007]": "Y", + "REFRESH[SQ008]": "", + "REFRESH[SQ009]": "", + "REFRESH[SQ010]": "", + "REFRESH[SQ011]": "", + "REFRESH[other]": "", + "MISSINT": "M3", + "MISSINT[other]": "", + "CAUTION[SQ001]": "", + "OTHERINT[SQ001]": "", + "OTHERINT[SQ001comment]": "", + "OTHERINT[SQ002]": "", + "OTHERINT[SQ002comment]": "", + "B01[SQ002]": "", + "B01[SQ003]": "", + "B01[SQ019]": "", + "B01[SQ005]": "", + "B01[SQ006]": "", + "B01[SQ016]": "", + "B01[SQ020]": "", + "B01[SQ007]": "", + "B01[SQ017]": "", + "B01[SQ010]": "", + "B01[SQ014]": "", + "B01[SQ011]": "", + "B01[SQ021]": "", + "B01[SQ012]": "", + "B02[SQ004]": "", + "B02[SQ005]": "", + "B02[SQ006]": "", + "B02[SQ018]": "", + "B02[SQ007]": "", + "B02[SQ008]": "", + "B02[SQ009]": "", + "B02[SQ011]": "", + "B02[SQ012]": "", + "B02[SQ015]": "", + "B02[SQ016]": "", + "B02[SQ017]": "", + "B05[WI]": "", + "B05[MA]": "", + "B05[LI]": "", + "B05[AN]": "", + "B05[IO]": "", + "B05[AP]": "", + "B05[IP]": "", + "B05[OT]": "", + "B03[SQ001]": "", + "B03[SQ002]": "", + "B03[SQ003]": "", + "B03[SQ004]": "", + "B03[SQ005]": "", + "B03[SQ006]": "", + "B03[SQ007]": "", + "B03[SQ008]": "", + "B03[SQ009]": "", + "B03[SQ010]": "", + "B03[SQ011]": "", + "B03[SQ012]": "", + "B03[SQ013]": "", + "B03[SQ014]": "", + "B03[SQ015]": "", + "B03[SQ016]": "", + "B03[SQ017]": "", + "B03[SQ018]": "", + "B04": "", + "A14": "", + "A13a": "A1", + "agreement[SQ001]": "Y" + } + } + ] +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/726131.json b/kardia-app/modules/ex_limesurvey/726131.json new file mode 100644 index 00000000..0a35fa7a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/726131.json @@ -0,0 +1 @@ +{"responses": [{"1":{"id":"1","submitdate":"2023-03-16 23:33:17","lastpage":"8","startlanguage":"en","seed":"1722147725","startdate":"2023-03-16 23:30:16","datestamp":"2023-03-16 23:33:17","ipaddr":"10.5.14.5","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Lara","Name2":"Rose","Name3":"","Email[1]":"LaraRose@letu.edu","Email[2]":"LaraRose@letu.edu","Gender":"F","ICCM":"N","Shirt":"A1","Shirt[comment]":"","OrgName":"LETU","OrgWeb":"https:\/\/www.letu.edu","OrgType":"A3","OrgAddress[SQ001]":"2100 S Mobberly Ave","OrgAddress[SQ002]":"Longview","OrgAddress[SQ003]":"Texas","OrgAddress[SQ004]":"75602","OrgAddress[SQ005]":"United States","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"Y","NonAttendingNames1[SQ001]":"Dan Rose","NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"Dan","BYOL":"Y","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"N","HousingCost":"50","SubTotal1":"375","SubTotal2":"150","SubTotal":"525","EarlyRegSelf":"93.75","EarlyRegNonAttending":"37.5","SubTotal3":"393.75","DiscountCode":"XOIF","Discount1":"0","TotalCost":"393.75","EndCost":"","Travel35":"Y","Travel4":"I'm special","Travel5[SQ001]":"Dan","Travel5[SQ002]":"607-768-5223","Travel5[SQ003]":"903-233-3210","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A3","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"Y","Final2":"A1","EndRegText":""}},{"2":{"id":"2","submitdate":"2023-03-16 23:36:20","lastpage":"8","startlanguage":"en","seed":"110849489","startdate":"2023-03-16 23:31:02","datestamp":"2023-03-16 23:36:20","ipaddr":"10.5.14.0","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Achua","Name2":"Myanmar","Name3":"Matrioshka Brain","Email[1]":"myemail@fakemail.com","Email[2]":"myemail@fakemail.com","Gender":"F","ICCM":"N","Shirt":"A6","Shirt[comment]":"","OrgName":"Universidad De Finland","OrgWeb":"Finald.net","OrgType":"A3","OrgAddress[SQ001]":"3100 Street Lane","OrgAddress[SQ002]":"CityTown","OrgAddress[SQ003]":"Oklahoma","OrgAddress[SQ004]":"543210","OrgAddress[SQ005]":"Turkey","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"Phil, my pet penguin","BYOL":"N","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"Y","HousingCost":"50","SubTotal1":"375","SubTotal2":"0","SubTotal":"375","EarlyRegSelf":"93.75","EarlyRegNonAttending":"","SubTotal3":"306.25","DiscountCode":"code.hakk","Discount1":"25","TotalCost":"281.25","EndCost":"","Travel35":"N","Travel4":null,"Travel5[SQ001]":"Genghis Kahn","Travel5[SQ002]":"1-800-sword-org","Travel5[SQ003]":"1-870-conquer-world","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A4","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"N","Final2":"A1","EndRegText":""}},{"3":{"id":"3","submitdate":"2023-03-16 23:45:08","lastpage":"8","startlanguage":"en","seed":"2064732826","startdate":"2023-03-16 23:31:22","datestamp":"2023-03-16 23:45:08","ipaddr":"10.5.13.157","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Nathan","Name2":"Moyes","Name3":"","Email[1]":"nathanmoyes@letu.edu","Email[2]":"nathanmoyes@letu.edu","Gender":"M","ICCM":"N","Shirt":"A7","Shirt[comment]":"Shirts are for the weak.","OrgName":"LeTourneau University, **THE** Christian Polytechnic University","OrgWeb":"https:\/\/github.com\/Natmoy-LETU\/kardia_LimeSurvey\/tree\/master\/kardia-app\/modules\/ex_limesurvey","OrgType":"A6","OrgAddress[SQ001]":"10 Downing Street","OrgAddress[SQ002]":"London","OrgAddress[SQ003]":"","OrgAddress[SQ004]":"","OrgAddress[SQ005]":"United Kingdom","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A2","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"Xi Jinping","BYOL":"Y","Reg3":"A2","Reg4":"A5","Reg5":"A2","Travel1":"A2","Travel2":"Jetpack","MissioNexus":"Y","HousingCost":"50","SubTotal1":"520","SubTotal2":"0","SubTotal":"520","EarlyRegSelf":"130","EarlyRegNonAttending":"","SubTotal3":"390","DiscountCode":"Not Applicable","Discount1":"25","TotalCost":"365","EndCost":"","Travel35":"Y","Travel4":"None. Just Testing.","Travel5[SQ001]":"Joe Biden","Travel5[SQ002]":"202-456-1111","Travel5[SQ003]":"202-456-6213","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A4","Privacy3[SQ005]":"Y","Privacy3[SQ001]":null,"Privacy3[SQ002]":null,"Privacy3[SQ003]":null,"Privacy3[SQ004]":null,"Privacy4":"N","Final2":"A1","EndRegText":""}},{"4":{"id":"4","submitdate":"2023-03-16 23:41:51","lastpage":"8","startlanguage":"en","seed":"274544989","startdate":"2023-03-16 23:31:49","datestamp":"2023-03-16 23:41:51","ipaddr":"10.5.14.6","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Randall","Name2":"Rinehart","Name3":"Randy","Email[1]":"randallrinehart@letu.edu","Email[2]":"randallrinehart@letu.edu","Gender":"M","ICCM":"N","Shirt":"A3","Shirt[comment]":"First Comment","OrgName":"LeTourneau University","OrgWeb":"letu.edu","OrgType":"A3","OrgAddress[SQ001]":"250 Oakridge Lane","OrgAddress[SQ002]":"Longview","OrgAddress[SQ003]":"Texas","OrgAddress[SQ004]":"75605","OrgAddress[SQ005]":"United States","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"James Salazar","BYOL":"Y","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"N","HousingCost":"50","SubTotal1":"375","SubTotal2":"0","SubTotal":"375","EarlyRegSelf":"93.75","EarlyRegNonAttending":"","SubTotal3":"281.25","DiscountCode":"","Discount1":"0","TotalCost":"281.25","EndCost":"","Travel35":"N","Travel4":null,"Travel5[SQ001]":"Jaime Rinehart","Travel5[SQ002]":"9038062536","Travel5[SQ003]":"9038062536","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A1","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"Y","Final2":"A1","EndRegText":""}},{"5":{"id":"5","submitdate":"2023-03-16 23:43:32","lastpage":"8","startlanguage":"en","seed":"1330257394","startdate":"2023-03-16 23:33:42","datestamp":"2023-03-16 23:43:32","ipaddr":"10.5.14.7","BaseCost":"225","Intro1":"","Promise1":"","Name1":"james","Name2":"salazar","Name3":"jamlsal","Email[1]":"jamessalazar@letu.edu","Email[2]":"jamessalazar@letu.edu","Gender":"M","ICCM":"N","Shirt":"A3","Shirt[comment]":"make it transparent","OrgName":"ham","OrgWeb":"google.c0m","OrgType":"A5","OrgAddress[SQ001]":"2100 S. Mobberly Ave","OrgAddress[SQ002]":"Longview","OrgAddress[SQ003]":"TX","OrgAddress[SQ004]":"75602","OrgAddress[SQ005]":"USA","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"kjhhjlhl","BYOL":"N","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"Y","HousingCost":"50","SubTotal1":"375","SubTotal2":"0","SubTotal":"375","EarlyRegSelf":"93.75","EarlyRegNonAttending":"","SubTotal3":"306.25","DiscountCode":"","Discount1":"25","TotalCost":"281.25","EndCost":"","Travel35":"Y","Travel4":"lkjjklj;klj;l","Travel5[SQ001]":"jlkjlkkljl","Travel5[SQ002]":"9009009999","Travel5[SQ003]":"9009009999","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A3","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"Y","Final2":"A1","EndRegText":""}}]} diff --git a/kardia-app/modules/ex_limesurvey/connect.qy b/kardia-app/modules/ex_limesurvey/connect.qy index c603f32f..d5c8ab2b 100644 --- a/kardia-app/modules/ex_limesurvey/connect.qy +++ b/kardia-app/modules/ex_limesurvey/connect.qy @@ -1,14 +1,25 @@ +// File that manages the API connections with limesurvery + $Version=2$ +activity "system/query" { - sql = "select, - -from - - + + // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + sql = "declare object KEY; -where + select + :KEY:API_KEY=:result + from + object /apps/kardia/modules/ex_limesurvey/get_key.http + ; + select + content_type = 'application/json', + inner_type = 'application/json', + objcontent = convert(string,from_base64(:result)) + from + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY) -"; + "; } diff --git a/kardia-app/modules/ex_limesurvey/firstname.qy b/kardia-app/modules/ex_limesurvey/firstname.qy new file mode 100644 index 00000000..c29f0e8f --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/firstname.qy @@ -0,0 +1,11 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "select name = eval(\":j:'\" +:cit:i_crm_field_first_name + \"'\", \"O\") + from identity wildcard ./testjson.json/responses/* j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 1 + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/get_key.http~ b/kardia-app/modules/ex_limesurvey/get_key.http~ new file mode 100644 index 00000000..3983e6d9 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/get_key.http~ @@ -0,0 +1,6 @@ +// Get the API key to make limesurevy API calls + +method "http/parameter" { type=string; usage=post; source=none; default="get_session_key"; } + "params.devel" "http/parameter" { type=string; usage=post; source=none; default="value 0"; } + "params.fuel-pull-lieu" "http/parameter" { type=string; usage=post; source=none; default="value 1"; } + id "http/parameter" { type=integer; usage=post; source=none; default=1; } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/get_list_of_survey.http b/kardia-app/modules/ex_limesurvey/get_list_of_survey.http new file mode 100644 index 00000000..6a1792cd --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/get_list_of_survey.http @@ -0,0 +1,55 @@ +// Get the list of suvery ID's + +//'{\"method\":\"list_surveys\",\"params\":[\"'+skey+'\"], \"id\": 1}' +$Version=2$ + +// Intial stuff that is requrided by Kardia +// Set up to do the API call +get_list_of_survey "application/http" +{ + server = "10.5.128.100"; // server address + path = "lsv3/index.php/admin/remotecontrol/"; // directory + protocol = "https"; + method = "POST"; + allowsubdirs = 1; + cache_min_ttl = 3600000; // one hour + cache_max_ttl = 86400000; // one day + request_content_type="application/json"; + + + // Sefisfie the method name to use in the API call + method "http/parameter" { + type=string; + usage=post; + source=none; + default="list_surveys"; // method name + } + + // List of peramters + // The syntaxt is params + // parmerter 1 + // This is the API key + + "KEY" "http/parameter" { + type=string; + usage=none; + source="param"; + default=""; + } + + "params.0" "http/parameter" { + type=string; + usage=post; + source=none; + default=runserver(:parameters:KEY); + } + + + // default that exists + id "http/parameter" { + type=integer; + usage=post; + source=none; + default=1; + } +} diff --git a/kardia-app/modules/ex_limesurvey/get_list_of_survey.http~ b/kardia-app/modules/ex_limesurvey/get_list_of_survey.http~ new file mode 100644 index 00000000..8d2e2887 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/get_list_of_survey.http~ @@ -0,0 +1,45 @@ +// Get the list of suvery ID's + +//'{\"method\":\"list_surveys\",\"params\":[\"'+skey+'\"], \"id\": 1}' +$Version=2$ + +// Intial stuff that is requrided by Kardia +// Set up to do the API call +get_list_of_survey "application/http" +{ + server = "10.5.128.100"; // server address + path = "lsv3/index.php/admin/remotecontrol/"; // direcory + protocol = "https"; + method = "POST"; + allowsubdirs = 1; + cache_min_ttl = 3600000; // one hour + cache_max_ttl = 86400000; // one day + request_content_type="application/json"; + + + // Sefisfie the method name to use in the API call + method "http/parameter" { + type=string; + usage=post; + source=none; + default="list_surveys"; // method name + } + + // List of peramters + // The syntaxt is params + // parmerter 1 + // This is the API key + "params.0" "http/parameter" { + type=string; + usage=post; + source=none; + default="hto76aa47hhhoTieDl0DE3ouILbP2FWo"; + } + // default that exists + id "http/parameter" { + type=integer; + usage=post; + source=none; + default=1; + } +} diff --git a/kardia-app/modules/ex_limesurvey/get_survey_responses.http b/kardia-app/modules/ex_limesurvey/get_survey_responses.http new file mode 100644 index 00000000..49f4c24e --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/get_survey_responses.http @@ -0,0 +1,94 @@ +// Make the responce request +// '{\"method\":\"export_responses\",\"params\":[\"'+skey+'\",\"'+sid+'\",\"json\",\"en\",\"full\"],\"id\": 1}' + +$Version=2$ + +// Intial stuff that is requrided by Kardia +// Set up to do the API call +get_survey_responses "application/http" +{ + server = "10.5.128.100"; // server address + path = "lsv3/index.php/admin/remotecontrol/"; // direcory + protocol = "https"; + method = "POST"; + allowsubdirs = 1; + cache_min_ttl = 3600000; // one hour + cache_max_ttl = 86400000; // one day + request_content_type="application/json"; + + + // Sefisfie the method name to use in the API call + method "http/parameter" { + type=string; + usage=post; + source=none; + default="export_responses"; // method name + } + + // List of peramters + // The syntaxt is params + // parmerter 1 + // This is the API key + "KEY" "http/parameter" { + type=string; + usage=none; + source="param"; + default=""; + } + + "params.0" "http/parameter" { + type=string; + usage=post; + source=none; + default=runserver(:parameters:KEY); + } + //peramter 2 + // This is the survey ID number + // User will supply this + + "SURVEY_ID" "http/parameter" { + type=string; + usage=none; + source="param"; + default=""; + } + + "params.1" "http/parameter" { + type=string; + usage=post; + source=none; + default="422914"; + //default=runserver(:parameters:SURVEY_ID); + } + //pamerter 3 + "params.2" "http/parameter" { + type=string; + usage=post; + source=none; + default="json"; + } + //parmenter 4 + "params.3" "http/parameter" { + type=string; + usage=post; + source=none; + default="en"; + } + //parmters 5 + "params.4" "http/parameter" { + type=string; + usage=post; + source=none; + default="full"; + } + // default that exists + id "http/parameter" { + type=integer; + usage=post; + source=none; + default=1; + } +} + +// Should output { "method":"get_session_key", "params":["USERNAME", "PASSWORD"], "id":1 } +// data='{\"method\":\"get_session_key\",\"params\":[\"admin\",\"fuel-pull-lieu\"],\"id\":1}') diff --git a/kardia-app/modules/ex_limesurvey/get_survey_responses.http~ b/kardia-app/modules/ex_limesurvey/get_survey_responses.http~ new file mode 100644 index 00000000..54ab1ba6 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/get_survey_responses.http~ @@ -0,0 +1,76 @@ +// Make the responce request +// '{\"method\":\"export_responses\",\"params\":[\"'+skey+'\",\"'+sid+'\",\"json\",\"en\",\"full\"],\"id\": 1}' + +$Version=2$ + +// Intial stuff that is requrided by Kardia +// Set up to do the API call +get_survey_responses "application/http" +{ + server = "10.5.128.100"; // server address + path = "lsv3/index.php/admin/remotecontrol/"; // direcory + protocol = "https"; + method = "POST"; + allowsubdirs = 1; + cache_min_ttl = 3600000; // one hour + cache_max_ttl = 86400000; // one day + request_content_type="application/json"; + + + // Sefisfie the method name to use in the API call + method "http/parameter" { + type=string; + usage=post; + source=none; + default="export_responses"; // method name + } + + // List of peramters + // The syntaxt is params.PRAMTER_VALUE + // parmerter 1 + // This is the user name + "params.0" "http/parameter" { + type=string; + usage=post; + source=none; + default="admin"; + } + //peramter 2 + // This is the password + "params.1" "http/parameter" { + type=string; + usage=post; + source=none; + default="fuel-pull-lieu"; + } + //pamerter 3 + "params.2" "http/parameter" { + type=string; + usage=post; + source=none; + default="json"; + } + //parmenter 4 + "params.2" "http/parameter" { + type=string; + usage=post; + source=none; + default="en"; + } + "params.3" "http/parameter" { + type=string; + usage=post; + source=none; + default="full"; + } + // default that exists + id "http/parameter" { + type=integer; + usage=post; + source=none; + default=1; + } +} + +// Should output { "method":"get_session_key", "params":["USERNAME", "PASSWORD"], "id":1 } +// data='{\"method\":\"get_session_key\",\"params\":[\"admin\",\"fuel-pull-lieu\"],\"id\":1}') diff --git a/kardia-app/modules/ex_limesurvey/gregconnect.qy b/kardia-app/modules/ex_limesurvey/gregconnect.qy new file mode 100644 index 00000000..e0bd3598 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/gregconnect.qy @@ -0,0 +1,26 @@ +// File that manages the API connections with limesurvery + +$Version=2$ + +activity "system/query" +{ + + // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + sql = "declare object KEY; + + select + :KEY:API_KEY=:result + from + object /apps/kardia/modules/ex_limesurvey/get_key.http + ; + + select + content_type = 'application/json', + inner_type = 'application/json', + objcontent = convert(string,from_base64(:result)), + name = 'file.json' + from + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY) + + "; +} diff --git a/kardia-app/modules/ex_limesurvey/import_insert.qy b/kardia-app/modules/ex_limesurvey/import_insert.qy new file mode 100644 index 00000000..6a463df6 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/import_insert.qy @@ -0,0 +1,51 @@ +$Version=2$ +myquery "system/query" + { + sql = " + INSERT INTO + /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows + SELECT + i_crm_email = eval(\":j:'\" + :cit:i_crm_field_email + \"'\", \"O\"), + i_crm_comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\"), + i_crm_phone = eval(\":j:'\" + :cit:i_crm_field_phone + \"'\", \"O\"), + i_crm_import_status = 'Y', + i_crm_create_partner = 0, + i_crm_create_email = 0, + i_crm_create_phone = 0, + s_date_created = getdate(), + s_created_by = 'Dummy User', + s_date_modified = getdate(), + s_modified_by = 'Dummy User', + + -- Everything from beginning to first space is considered first name (first word in string) + i_crm_given_name = rtrim(ltrim(substring( + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")), + 1, + charindex( + ' ', + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")) + ) - 1 + ))), + + -- Everything from the last space to the end is considered surname (final word in string) + i_crm_surname = rtrim(ltrim(reverse(substring( + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))), + 1, + charindex( + ' ', + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))) + ) - 1 + )))), + + i_crm_address1 = eval(\":j:'\" + :cit:i_crm_field_addr1 + \"'\", \"O\") + FROM + IDENTITY + WILDCARD ./422914.json/responses/* j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 422914 + AND + :j:submitdate IS NOT NULL + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/james_import_insert.qy b/kardia-app/modules/ex_limesurvey/james_import_insert.qy new file mode 100644 index 00000000..113abe75 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/james_import_insert.qy @@ -0,0 +1,47 @@ +$Version=2$ +myquery "system/query" + { + sql = " + INSERT INTO + /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows + SELECT + i_crm_email = eval(\":j:'\" + :cit:i_crm_field_email + \"'\", \"O\"), + i_crm_comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\"), + i_crm_phone = eval(\":j:'\" + :cit:i_crm_field_phone + \"'\", \"O\"), + i_crm_import_status = 'Y', + i_crm_create_partner = 0, + i_crm_create_email = 0, + i_crm_create_phone = 0, + s_date_created = getdate(), + s_created_by = 'Dummy User', + s_date_modified = getdate(), + s_modified_by = 'Dummy User', + + -- Everything from beginning to first space is considered first name (first word in string) + i_crm_given_name = rtrim(ltrim(substring( + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")), + 1, + charindex( + ' ', + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")) + ) - 1 + ))), + + -- Everything from the last space to the end is considered surname (final word in string) + i_crm_surname = rtrim(ltrim(reverse(substring( + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))), + 1, + charindex( + ' ', + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))) + ) - 1 + )))) + FROM + IDENTITY + WILDCARD /apps/kardia/modules/ex_limesurvey/connect.qy/* j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 422914 + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/james_import_insert.qy~ b/kardia-app/modules/ex_limesurvey/james_import_insert.qy~ new file mode 100644 index 00000000..7aeaf7d6 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/james_import_insert.qy~ @@ -0,0 +1,49 @@ +$Version=2$ +myquery "system/query" + { + sql = " + INSERT INTO + /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows + SELECT + i_crm_email = eval(\":j:'\" + :cit:i_crm_field_email + \"'\", \"O\"), + i_crm_comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\"), + i_crm_phone = eval(\":j:'\" + :cit:i_crm_field_phone + \"'\", \"O\"), + i_crm_import_status = 'Y', + i_crm_create_partner = 0, + i_crm_create_email = 0, + i_crm_create_phone = 0, + s_date_created = getdate(), + s_created_by = 'Dummy User', + s_date_modified = getdate(), + s_modified_by = 'Dummy User', + + -- Everything from beginning to first space is considered first name (first word in string) + i_crm_given_name = rtrim(ltrim(substring( + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")), + 1, + charindex( + ' ', + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")) + ) - 1 + ))), + + -- Everything from the last space to the end is considered surname (final word in string) + i_crm_surname = rtrim(ltrim(reverse(substring( + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))), + 1, + charindex( + ' ', + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))) + ) - 1 + )))) + FROM + IDENTITY + WILDCARD ./422914.json/responses/* j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 422914 + AND + :j:submitdate IS NOT NULL + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_i.qy b/kardia-app/modules/ex_limesurvey/ldr_i.qy new file mode 100644 index 00000000..3c3a6555 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_i.qy @@ -0,0 +1,29 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "INSERT INTO /apps/kardia/data/Kardia_DB/i_crm_import_type/rows + select i_crm_import_type_id=2, + i_crm_import_type_desc='email', + i_crm_import_type_subsys='LSAP', + i_crm_import_type_path='/test/path', + i_crm_field_pk='', + i_crm_field_surname='Rinehart', + i_crm_field_given_name='Randall', + i_crm_field_middle_name='Stoddard', + i_crm_field_date='2023-03-16 10:09:00', + i_crm_field_org_name='LeTourneau University', + i_crm_field_phone='903-503-1531', + i_crm_field_email='randallrinehart@letu.edu', + i_crm_field_addr1='2100 S. Mobberly Ave', + i_crm_field_city='Longview', + i_crm_field_stateprov='TX', + i_crm_field_postal_code='75602', + i_crm_field_country='USA', + s_date_created=convert(datetime,'2023-03-14 10:48:00'), + s_created_by='rrinehart', + s_date_modified=convert(datetime,'2023-03-14 10:48:00'), + s_modified_by= 'rrinehart' + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_s.qy b/kardia-app/modules/ex_limesurvey/ldr_s.qy index c4ab9acb..965be243 100644 --- a/kardia-app/modules/ex_limesurvey/ldr_s.qy +++ b/kardia-app/modules/ex_limesurvey/ldr_s.qy @@ -6,6 +6,6 @@ myquery "system/query" sql = " select * from - identity /apps/kardia/data/Kardia_DB.i_crm_import_type/rows + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows "; } diff --git a/kardia-app/modules/ex_limesurvey/ldr_s_joined.qy b/kardia-app/modules/ex_limesurvey/ldr_s_joined.qy new file mode 100644 index 00000000..875cf7fa --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_s_joined.qy @@ -0,0 +1,12 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "select email = eval(\":j:'\" +:cit:i_crm_field_email + \"'\", \"O\") + + from identity wildcard ./testjson.json/responses/* j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + where + :cit:i_crm_import_type_id='1' + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_select_comment.qy b/kardia-app/modules/ex_limesurvey/ldr_select_comment.qy new file mode 100644 index 00000000..301851f1 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_select_comment.qy @@ -0,0 +1,15 @@ +$Version=2$ +myquery "system/query" + { + sql = " + SELECT + comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\") + FROM + IDENTITY + ./connect.qy j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 1 + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_u.qy b/kardia-app/modules/ex_limesurvey/ldr_u.qy new file mode 100644 index 00000000..9fdf9aee --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_u.qy @@ -0,0 +1,12 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "update identity /apps/kardia/data/Kardia_DB/i_crm_import_type/rows/ i + + set + :i:i_crm_field_email='A01[SQ002]' + where :i:i_crm_import_type_id='2' + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_u_comment.qy b/kardia-app/modules/ex_limesurvey/ldr_u_comment.qy new file mode 100644 index 00000000..168c76b5 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_u_comment.qy @@ -0,0 +1,12 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "update identity /apps/kardia/data/Kardia_DB/i_crm_import_type/rows/ i + + set + :i:i_crm_field_comment='A06' + where :i:i_crm_import_type_id='1' + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_u_org_name.qy b/kardia-app/modules/ex_limesurvey/ldr_u_org_name.qy new file mode 100644 index 00000000..ccc65c8e --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_u_org_name.qy @@ -0,0 +1,12 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "update identity /apps/kardia/data/Kardia_DB/i_crm_import_type/rows/ i + + set + :i:i_crm_field_org_name ='A01b[SQ001]' + where :i:i_crm_import_type_id='2' + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/ldr_u_phone.qy b/kardia-app/modules/ex_limesurvey/ldr_u_phone.qy new file mode 100644 index 00000000..247f8eef --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_u_phone.qy @@ -0,0 +1,12 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "update identity /apps/kardia/data/Kardia_DB/i_crm_import_type/rows/ i + + set + :i:i_crm_field_phone='A01[SQ003]' + where :i:i_crm_import_type_id='1' + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/lr.txt b/kardia-app/modules/ex_limesurvey/lr.txt new file mode 100644 index 00000000..af27ff49 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/lr.txt @@ -0,0 +1 @@ +This is a test file. \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/lsv3.qy b/kardia-app/modules/ex_limesurvey/lsv3.qy new file mode 100644 index 00000000..e69de29b diff --git a/kardia-app/modules/ex_limesurvey/newNewtestJSON.json b/kardia-app/modules/ex_limesurvey/newNewtestJSON.json new file mode 100644 index 00000000..1b67fc10 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/newNewtestJSON.json @@ -0,0 +1,492 @@ +{ + "responses": [ + { + "1": { + "id": "1", + "submitdate": "2023-03-16 16:24:24", + "lastpage": "2", + "startlanguage": "en", + "seed": "1547144365", + "startdate": "2023-03-16 16:21:00", + "datestamp": "2023-03-16 16:24:24", + "ipaddr": "10.5.14.5", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/admin\\/survey\\/sa\\/view\\/surveyid\\/347787", + "A01[SQ001]": "Lara D Rose", + "A01[SQ002]": "lararose@letu.edu", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "6077689205", + "A01[SQ005]": "", + "A01[SQ004]": "", + "A01b[SQ001]": "LeTourneau University", + "A01b[SQ002]": "1991", + "A01b[SQ003]": "CSMA", + "A01b[SQ004]": "Bachelor's", + "A01c": "H3", + "A01c[comment]": "", + "A02[SQ001]": "", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "Y", + "A03[SQ001]": "I0", + "A03[SQ013]": "I0", + "A03[SQ002]": "I2", + "A03[SQ003]": "I2", + "A03[SQ020]": "I2", + "A03[SQ004]": "I2", + "A03[SQ006]": "I1", + "A03[SQ019]": "I3", + "A03[SQ007]": "I3", + "A03[SQ008]": "I3", + "A03[SQ009]": "I3", + "A03[SQ010]": "I3", + "A03[SQ011]": "", + "A03[SQ014]": "I2", + "A03[SQ018]": "I3", + "A03[SQ021]": "I3", + "A03[SQ012]": "I3", + "A03[SQ025]": "I3", + "A03[SQ024]": "I3", + "A03[SQ015]": "I3", + "A03[SQ016]": "I3", + "A03[SQ017]": "I3", + "A03[SQ022]": "I3", + "A03[SQ023]": "I3", + "A04": "", + "A04[comment]": "", + "A05": "", + "A05[comment]": "", + "A06": "Thank you for how you are impacting and challenging our students!" + } + }, + { + "2": { + "id": "2", + "submitdate": "2023-03-16 16:26:43", + "lastpage": "2", + "startlanguage": "en", + "seed": "313444009", + "startdate": "2023-03-16 16:23:11", + "datestamp": "2023-03-16 16:26:43", + "ipaddr": "10.5.14.6", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "Randall Rinehart", + "A01[SQ002]": "randallrinehart22@gmail.com", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "903-503-1531", + "A01[SQ005]": "", + "A01[SQ004]": "Longview, Texas", + "A01b[SQ001]": "LeTourneau University", + "A01b[SQ002]": "2026", + "A01b[SQ003]": "Computer Science and Engineering", + "A01b[SQ004]": "Bachelor's", + "A01c": "H2", + "A01c[comment]": "Heard about it at an announcement, then a friend told me more and got me interested", + "A02[SQ001]": "", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "", + "A03[SQ001]": "I0", + "A03[SQ013]": "I0", + "A03[SQ002]": "I1", + "A03[SQ003]": "I4", + "A03[SQ020]": "I3", + "A03[SQ004]": "I1", + "A03[SQ006]": "I1", + "A03[SQ019]": "I0", + "A03[SQ007]": "I4", + "A03[SQ008]": "I3", + "A03[SQ009]": "I3", + "A03[SQ010]": "I4", + "A03[SQ011]": "I4", + "A03[SQ014]": "I2", + "A03[SQ018]": "I0", + "A03[SQ021]": "I0", + "A03[SQ012]": "I0", + "A03[SQ025]": "I2", + "A03[SQ024]": "I3", + "A03[SQ015]": "I2", + "A03[SQ016]": "I2", + "A03[SQ017]": "I2", + "A03[SQ022]": "I0", + "A03[SQ023]": "I0", + "A04": "M1", + "A04[comment]": "", + "A05": "L3", + "A05[comment]": "", + "A06": "" + } + }, + { + "3": { + "id": "3", + "submitdate": "2023-03-16 16:31:56", + "lastpage": "2", + "startlanguage": "en", + "seed": "673284565", + "startdate": "2023-03-16 16:24:24", + "datestamp": "2023-03-16 16:31:56", + "ipaddr": "10.5.13.157", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "Richard Nixon", + "A01[SQ002]": "watergatefan1900@outlook.com", + "A01[SQ008]": "n\\/a", + "A01[SQ009]": "None", + "A01[SQ003]": "1(719)-545-6678", + "A01[SQ005]": "Afternoon", + "A01[SQ004]": "The White House, 75603", + "A01b[SQ001]": "East Texas Baptist University", + "A01b[SQ002]": "Never", + "A01b[SQ003]": "Political Science", + "A01b[SQ004]": "Bachelor's of Science (BS)", + "A01c": "H7", + "A01c[comment]": "I heard about LightSys from LightSys. The maximum character limit for this input is about to be tested:\r\nBorder Case errors:\r\n\r\n-False positive with shared Last names: \r\n\r\n-Parent-partner key issue: \r\n *Each data entry corresponds with an identifying key.\r\n *All are given Primary keys for each data entry\r\n *There are a couple of functions that check for duplicates \r\n and assign a corresponding partner key to each duplicate.\r\n *When Primary and partner keys match, flase positives occur?\r\n ~Which function is checking Primary keys vs. partner keys?\r\n ~Which one s assign\\/generate these keys?\r\n ~Which one reads keys and assigns duplicate status?\r\n \r\n\r\n\r\nParent-Partner Key Analysis:\r\n\r\n-Searched GitHub directory for files editing:\r\n * \"parent_key\"\r\n * \"partner_key\"\r\n * \"p_partner_key\"\r\n * Primary Keys\r\n * \"duplicate_checking.qy\"\r\n * \"duplicate_records.qy\"\r\n * \"duplicate_create_pairs.qy\"\r\n *Function that generates table \\u201ctmp_pcl_duplicates\\u201d\r\n * \"tmp_partner_data\"\r\n * \"tmp_partner_condensed\"\r\n * \"tmp_partner_pairs\"\r\n\r\n-Result:\r\n *Checked files shared across Centrallix and Kardia (See final documentation)\r\n *Checked individual files within Kardia application folder on GitHub\r\n\r\n-Talked w\\/ Project Owner (Mr. Greg Beeley):\r\n *Parent keys are a type of foreign key (points back to a primary key)\r\n that relates partner keys (a type of primary key) with the primary \r\n key of each input\r\n *The problem is when the program does not recognize that the parent key\r\n connects two entries and falsely flags them as duplicates (they are \r\n actually intentionally seperate entries)\r\n\r\n-After further investigation, relevant file(s) are;\r\n * \"dup_check.cmp\" (Searches for duplicates)\r\n * \"next_partner.cmp\" (Part of referencing & assigning partner keys) \r\n * \"api_partner.qyt\" (Populates\\/stores partner info including partner key)\r\n * \"duplicate_checking.qy\" (Creates table based off detected duplicates)\r\n\r\n-Needs:\r\n *Program must check against parent keys (located where? Parent keys were never\r\n implemented before the 3\\/14\\/22-3\\/18\\/22 sprint) to prevent false marking of duplicates\r\n *After sorting through code, must find table that partner key is drawn from\r\n *Must also locate table or function that parent key is drawn from\\/given by\r\n\r\n-Concerns:\r\n *What if there are different primary keys for each partner, but other details are mostly\r\n the same? \r\n *Is a Parent key ever assigned to linked entities? \r\n\r\n-Solutions:\r\n *If necessary, add code that creates and assigns a parent key to specific entries\r\n ~How to make sure non-related entities aren't accidentally connected?\r\n ~Manual flagging by user? \r\n >Prompt to flag duplicates as non-related during output\r\n >Added to table during entry of info? Manual entry of automated population?\r\n *Rewrite code to draw from\\/check for parent keys when comparing\\/locating duplicates and\r\n not include them in output (or not pass to table generating function)\r\n ~Use in temp tables of duplicate_checking.qy query and its join function\r\n\r\n\r\n-IMPLEMENTATION (all addresses are under duplicate-checking branches of kardia and centrallix):\r\n \r\n *Edit all files that implement\\/initialize tables to include a category for relate_key (a.k.a. parent_key)\r\n and allow users to set relationships (entries sharing the same relate_key) during initial data entry\r\n ~api_partner.qyt (pulls partner data from a number of tables): kardia\\/kardia-app\\/modules\\/base\\/api_partner.qyt\r\n >tables: \\/apps\\/kardia\\/data\\/Kardia_DB\r\n ~new_partner.cmp (Adds new partner entries, generates partner key, and checks for duplicate partner entries):\r\n kardia\\/kardia-app\\/modules\\/base\\/new_partner.cmp\r\n ~p_partner_relationship.cmp (Sets a relationship value between a partner and person entry):\r\n kardia\\/kardia-app\\/modules\\/base\\/p_partner_relationship.cmp\r\n ~partner_edit.cmp (allows editing of a partner's data): kardia\\/kardia-app\\/modules\\/base\\/partner_edit.cmp\r\n ~person_data.qy (pulls data and keys for a person entry): kardia\\/kardia-app\\/modules\\/base\\/person_data.qy\r\n ~p_person.cmp (creates UI for pulling\\/editing person data): kardia\\/kardia-app\\/modules\\/base\\/p_person.cmp\r\n\r\n *Add a method to duplicate_checking.qy that checks potential duplicates\r\n to see if their relate_key values match and avoid printing these related entries as duplicates.\r\n ~duplicate_checking.qy (evaluates data to detect duplicates and feeds results to tmp_pcl_duplicates):\r\n kardia\\/kardia-app\\/modules\\/base\\/duplicate_checking.qy\r\n\r\n *Add an option (via query, code, and\\/or eventually UI) to flag duplicates listed by duplicate_records.qy\r\n and duplicate_create_pairs.qy as related nonduplicates using the relate_key value\r\n ~duplicate_create_pairs.qy (sorts duplicate results into pairs for comparison): \r\n kardia\\/kardia-app\\/modules\\/base\\/duplicate_create_pairs.qy\r\n >table tmp_sorted_duplicates (where duplicate_create_pairs.qy data is stored):\r\n LOCATION UNKNOWN- Generated\\/destroyed during runtime?\r\n ~duplicate_records.qy (returns data for each \"duplicate\" especially primary and partner keys): \r\n kardia\\/kardia-app\\/modules\\/base\\/duplicate_records.qy\r\n ~dup_check.cmp (presents results of duplicate checking queries): kardia\\/kardia-app\\/modules\\/base\\/dup_check.cmp\r\n ", + "A02[SQ001]": "", + "A02[SQ002]": "", + "A02[SQ003]": "", + "A02[SQ004]": "Y", + "A02[SQ005]": "", + "A02[SQ006]": "Y", + "A03[SQ001]": "I2", + "A03[SQ013]": "I3", + "A03[SQ002]": "I4", + "A03[SQ003]": "I2", + "A03[SQ020]": "I3", + "A03[SQ004]": "I3", + "A03[SQ006]": "I1", + "A03[SQ019]": "I2", + "A03[SQ007]": "I3", + "A03[SQ008]": "I4", + "A03[SQ009]": "I3", + "A03[SQ010]": "I2", + "A03[SQ011]": "I3", + "A03[SQ014]": "I4", + "A03[SQ018]": "I4", + "A03[SQ021]": "I4", + "A03[SQ012]": "I4", + "A03[SQ025]": "I3", + "A03[SQ024]": "I4", + "A03[SQ015]": "I3", + "A03[SQ016]": "I0", + "A03[SQ017]": "I3", + "A03[SQ022]": "I3", + "A03[SQ023]": "I3", + "A04": "M6", + "A04[comment]": "To know Christ and make Him known", + "A05": "", + "A05[comment]": "", + "A06": "); select \"i_crm_partner_import\");" + } + }, + { + "4": { + "id": "4", + "submitdate": "2023-03-16 16:27:54", + "lastpage": "2", + "startlanguage": "en", + "seed": "1274956380", + "startdate": "2023-03-16 16:24:29", + "datestamp": "2023-03-16 16:27:54", + "ipaddr": "10.5.14.0", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "Sarah Kushner", + "A01[SQ002]": "sarahkushner@letu.edu", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "903-239-2940", + "A01[SQ005]": "Daytime", + "A01[SQ004]": "Texas", + "A01b[SQ001]": "LeTourneau University", + "A01b[SQ002]": "2026", + "A01b[SQ003]": "Computer Science and Engineering Technology", + "A01b[SQ004]": "Bachelor of Science", + "A01c": "H3", + "A01c[comment]": "", + "A02[SQ001]": "", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "Y", + "A03[SQ001]": "I4", + "A03[SQ013]": "I4", + "A03[SQ002]": "I4", + "A03[SQ003]": "I4", + "A03[SQ020]": "I4", + "A03[SQ004]": "I4", + "A03[SQ006]": "I4", + "A03[SQ019]": "I0", + "A03[SQ007]": "I4", + "A03[SQ008]": "I4", + "A03[SQ009]": "I4", + "A03[SQ010]": "I4", + "A03[SQ011]": "I4", + "A03[SQ014]": "I4", + "A03[SQ018]": "I3", + "A03[SQ021]": "I0", + "A03[SQ012]": "I0", + "A03[SQ025]": "I2", + "A03[SQ024]": "I3", + "A03[SQ015]": "I1", + "A03[SQ016]": "I1", + "A03[SQ017]": "I4", + "A03[SQ022]": "I3", + "A03[SQ023]": "I3", + "A04": "M3", + "A04[comment]": "", + "A05": "L1", + "A05[comment]": "", + "A06": "" + } + }, + { + "5": { + "id": "5", + "submitdate": "2023-03-16 16:35:56", + "lastpage": "2", + "startlanguage": "en", + "seed": "130468167", + "startdate": "2023-03-16 16:32:30", + "datestamp": "2023-03-16 16:35:56", + "ipaddr": "10.5.14.7", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "James Salazar", + "A01[SQ002]": "jamessalazar421@gmail.com", + "A01[SQ008]": "willthiswork", + "A01[SQ009]": "https:\\/\\/jamlsal.itch.io\\/a-grave-mistaik", + "A01[SQ003]": "5122124774", + "A01[SQ005]": "now", + "A01[SQ004]": "here", + "A01b[SQ001]": "YEET", + "A01b[SQ002]": "2000", + "A01b[SQ003]": "MATH", + "A01b[SQ004]": "PHD", + "A01c": "H3", + "A01c[comment]": "Dr. Gowing made me come", + "A02[SQ001]": "Y", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "Y", + "A02[SQ005]": "", + "A02[SQ006]": "", + "A03[SQ001]": "I0", + "A03[SQ013]": "I2", + "A03[SQ002]": "I3", + "A03[SQ003]": "I1", + "A03[SQ020]": "I4", + "A03[SQ004]": "", + "A03[SQ006]": "I1", + "A03[SQ019]": "I3", + "A03[SQ007]": "I0", + "A03[SQ008]": "I4", + "A03[SQ009]": "I2", + "A03[SQ010]": "I4", + "A03[SQ011]": "", + "A03[SQ014]": "", + "A03[SQ018]": "I2", + "A03[SQ021]": "I1", + "A03[SQ012]": "", + "A03[SQ025]": "I4", + "A03[SQ024]": "I2", + "A03[SQ015]": "I4", + "A03[SQ016]": "I1", + "A03[SQ017]": "I4", + "A03[SQ022]": "I1", + "A03[SQ023]": "I2", + "A04": "M2", + "A04[comment]": "", + "A05": "L3", + "A05[comment]": "", + "A06": "Will this work" + } + }, + { + "6": { + "id": "6", + "submitdate": null, + "lastpage": null, + "startlanguage": "en", + "seed": "1642284294", + "startdate": "2023-03-16 21:46:54", + "datestamp": "2023-03-16 21:46:54", + "ipaddr": "10.5.14.5", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/admin\\/survey\\/sa\\/view\\/surveyid\\/347787", + "A01[SQ001]": null, + "A01[SQ002]": null, + "A01[SQ008]": null, + "A01[SQ009]": null, + "A01[SQ003]": null, + "A01[SQ005]": null, + "A01[SQ004]": null, + "A01b[SQ001]": null, + "A01b[SQ002]": null, + "A01b[SQ003]": null, + "A01b[SQ004]": null, + "A01c": null, + "A01c[comment]": null, + "A02[SQ001]": null, + "A02[SQ002]": null, + "A02[SQ003]": null, + "A02[SQ004]": null, + "A02[SQ005]": null, + "A02[SQ006]": null, + "A03[SQ001]": null, + "A03[SQ013]": null, + "A03[SQ002]": null, + "A03[SQ003]": null, + "A03[SQ020]": null, + "A03[SQ004]": null, + "A03[SQ006]": null, + "A03[SQ019]": null, + "A03[SQ007]": null, + "A03[SQ008]": null, + "A03[SQ009]": null, + "A03[SQ010]": null, + "A03[SQ011]": null, + "A03[SQ014]": null, + "A03[SQ018]": null, + "A03[SQ021]": null, + "A03[SQ012]": null, + "A03[SQ025]": null, + "A03[SQ024]": null, + "A03[SQ015]": null, + "A03[SQ016]": null, + "A03[SQ017]": null, + "A03[SQ022]": null, + "A03[SQ023]": null, + "A04": null, + "A04[comment]": null, + "A05": null, + "A05[comment]": null, + "A06": null + } + }, + { + "7": { + "id": "7", + "submitdate": "2023-03-16 22:35:29", + "lastpage": "2", + "startlanguage": "en", + "seed": "1105781397", + "startdate": "2023-03-16 21:47:01", + "datestamp": "2023-03-16 22:35:29", + "ipaddr": "10.5.14.6", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": " John Jacob Jingleheimer Schmidt ", + "A01[SQ002]": "johnjs42@hotmail.com", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "903-555-1234", + "A01[SQ005]": "", + "A01[SQ004]": "Elmira, New York", + "A01b[SQ001]": "Kilgore College", + "A01b[SQ002]": "2023", + "A01b[SQ003]": "Mechatronics", + "A01b[SQ004]": "BS", + "A01c": "H1", + "A01c[comment]": "Please enter your comment here:", + "A02[SQ001]": "Y", + "A02[SQ002]": "Y", + "A02[SQ003]": "Y", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "", + "A03[SQ001]": "I0", + "A03[SQ013]": "", + "A03[SQ002]": "", + "A03[SQ003]": "", + "A03[SQ020]": "", + "A03[SQ004]": "I2", + "A03[SQ006]": "", + "A03[SQ019]": "", + "A03[SQ007]": "I1", + "A03[SQ008]": "", + "A03[SQ009]": "I4", + "A03[SQ010]": "I0", + "A03[SQ011]": "", + "A03[SQ014]": "", + "A03[SQ018]": "", + "A03[SQ021]": "I1", + "A03[SQ012]": "I2", + "A03[SQ025]": "", + "A03[SQ024]": "I1", + "A03[SQ015]": "I3", + "A03[SQ016]": "", + "A03[SQ017]": "I1", + "A03[SQ022]": "I1", + "A03[SQ023]": "I1", + "A04": "M1", + "A04[comment]": "", + "A05": "L1", + "A05[comment]": "", + "A06": "Other Comments you have for us:" + } + }, + { + "8": { + "id": "8", + "submitdate": "2023-03-16 22:34:36", + "lastpage": "2", + "startlanguage": "en", + "seed": "1362575118", + "startdate": "2023-03-16 22:32:00", + "datestamp": "2023-03-16 22:34:36", + "ipaddr": "10.5.14.5", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/admin\\/survey\\/sa\\/view\\/surveyid\\/347787", + "A01[SQ001]": " Robert Nelson Wallace ", + "A01[SQ002]": "robertnelsonwallace@gmail.com", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "770-228-3267", + "A01[SQ005]": "6 AM", + "A01[SQ004]": "40 Leianne Drive, Griffin, GA 30223 USA", + "A01b[SQ001]": "LeTourneau University ", + "A01b[SQ002]": "1945", + "A01b[SQ003]": "Business", + "A01b[SQ004]": "MBA", + "A01c": "H2", + "A01c[comment]": "", + "A02[SQ001]": "", + "A02[SQ002]": "", + "A02[SQ003]": "", + "A02[SQ004]": "Y", + "A02[SQ005]": "", + "A02[SQ006]": "", + "A03[SQ001]": "I4", + "A03[SQ013]": "", + "A03[SQ002]": "", + "A03[SQ003]": "", + "A03[SQ020]": "", + "A03[SQ004]": "", + "A03[SQ006]": "", + "A03[SQ019]": "", + "A03[SQ007]": "", + "A03[SQ008]": "", + "A03[SQ009]": "", + "A03[SQ010]": "", + "A03[SQ011]": "", + "A03[SQ014]": "", + "A03[SQ018]": "", + "A03[SQ021]": "", + "A03[SQ012]": "", + "A03[SQ025]": "", + "A03[SQ024]": "", + "A03[SQ015]": "", + "A03[SQ016]": "", + "A03[SQ017]": "", + "A03[SQ022]": "", + "A03[SQ023]": "", + "A04": "M2", + "A04[comment]": "", + "A05": "L4", + "A05[comment]": "", + "A06": "Jesus was a carpenter." + } + } + ] +} diff --git a/kardia-app/modules/ex_limesurvey/newconnect.qy b/kardia-app/modules/ex_limesurvey/newconnect.qy new file mode 100644 index 00000000..d5c8ab2b --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/newconnect.qy @@ -0,0 +1,25 @@ +// File that manages the API connections with limesurvery + +$Version=2$ + +activity "system/query" +{ + + // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + sql = "declare object KEY; + + select + :KEY:API_KEY=:result + from + object /apps/kardia/modules/ex_limesurvey/get_key.http + ; + + select + content_type = 'application/json', + inner_type = 'application/json', + objcontent = convert(string,from_base64(:result)) + from + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY) + + "; +} diff --git a/kardia-app/modules/ex_limesurvey/phone.qy b/kardia-app/modules/ex_limesurvey/phone.qy new file mode 100644 index 00000000..ac9d3a5b --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/phone.qy @@ -0,0 +1,10 @@ +$Version=2$ +myquery "system/query" +{ + id "query/parameter" { type=integer; style=strnull; } + sql = "select + phone = eval :j: + :cit:i_crm_field_phone + '', 'O') + from + wildcard /testjson.json/responses/* , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/phonefinal.qy b/kardia-app/modules/ex_limesurvey/phonefinal.qy new file mode 100644 index 00000000..7c0a7bc0 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/phonefinal.qy @@ -0,0 +1,11 @@ +$Version=2$ +myquery "system/query" + { + id "query/parameter" { type=integer; } + + sql = "select phone = eval(\":j:'\" +:cit:i_crm_field_phone + \"'\", \"O\") + from identity wildcard ./testjson.json/responses/* j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 1 + "; + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/phonenumber.qy b/kardia-app/modules/ex_limesurvey/phonenumber.qy new file mode 100644 index 00000000..fb8c64fc --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/phonenumber.qy @@ -0,0 +1,15 @@ + $Version=2$ + myquery "system/query" + { + id "query/parameter" { type=integer; } + + select + phone = " eval(':j:' + :cit:i_crm_field_phone + ''', 'O') + from wildcard ./testjson.json/responses/* j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows + + cit + + + "; + + } \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/rsr_select_comment.qy b/kardia-app/modules/ex_limesurvey/rsr_select_comment.qy new file mode 100644 index 00000000..6b35fbaf --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/rsr_select_comment.qy @@ -0,0 +1,15 @@ +$Version=2$ +myquery "system/query" + { + sql = " + SELECT + comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\") + FROM + IDENTITY + WILDCARD ./testjson.json/responses/* j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = 1 + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/sk.qy b/kardia-app/modules/ex_limesurvey/sk.qy new file mode 100644 index 00000000..e69de29b diff --git a/kardia-app/modules/ex_limesurvey/srk b/kardia-app/modules/ex_limesurvey/srk new file mode 100644 index 00000000..e69de29b diff --git a/kardia-app/modules/ex_limesurvey/srk.qy b/kardia-app/modules/ex_limesurvey/srk.qy new file mode 100644 index 00000000..82dcb59a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/srk.qy @@ -0,0 +1,33 @@ +$Version=2$ + +myquery "system/query" + { + + id "query/parameter" { type=integer; } + + sql = " INSERT INTO /apps/Kardia/data/Kardia_DB/i_crm_import_type/rows + select + i_crm_import_type_id='2', + i_crm_import_type_descemail='', + i_crm_import_type_subsys='LSAP', + i_crm_import_type_path='c:\\', + i_crm_field_pk='', + i_crm_field_surname='Rinehart', + i_crm_field_given_name='Randall', + 'i_crm_field_middle_name='Stoddard', + i_crm_field_date, + i_crm_field_org_name='LeTourneau University', + i_crm_field_phone='903-503-1531', + i_crm_field_email='randallrinehart@letu.edu', + i_crm_field_addr1='2100 S. Mobberly Ave', + i_crm_field_city='Longview', + i_crm_field_stateprov='TX', + i_crm_field_postal_code='75602', + i_crm_field_country='USA', + s_date_created='2023-03-14 10:48:00', + s_created_by='rrinehart', + s_date_modified='2023-03-14 10:48:00', + s_modified_by= 'rrinehart' + "; + } + diff --git a/kardia-app/modules/ex_limesurvey/testing.qy b/kardia-app/modules/ex_limesurvey/testing.qy new file mode 100644 index 00000000..f37e1b87 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/testing.qy @@ -0,0 +1,8 @@ +$Version=2$ + +myquery = "system/query" +{ + id "query/parameter" {type=integer; } + sql = + select i_crm_field_addr1 +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/testjson.json b/kardia-app/modules/ex_limesurvey/testjson.json new file mode 100644 index 00000000..fbeb1f25 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/testjson.json @@ -0,0 +1,309 @@ +{ + "responses": [ + { + "1": { + "id": "1", + "submitdate": "2023-03-16 16:24:24", + "lastpage": "2", + "startlanguage": "en", + "seed": "1547144365", + "startdate": "2023-03-16 16:21:00", + "datestamp": "2023-03-16 16:24:24", + "ipaddr": "10.5.14.5", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/admin\\/survey\\/sa\\/view\\/surveyid\\/347787", + "A01[SQ001]": "Lara D Rose", + "A01[SQ002]": "lararose@letu.edu", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "6077689205", + "A01[SQ005]": "", + "A01[SQ004]": "", + "A01b[SQ001]": "LeTourneau University", + "A01b[SQ002]": "1991", + "A01b[SQ003]": "CSMA", + "A01b[SQ004]": "Bachelor's", + "A01c": "H3", + "A01c[comment]": "", + "A02[SQ001]": "", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "Y", + "A03[SQ001]": "I0", + "A03[SQ013]": "I0", + "A03[SQ002]": "I2", + "A03[SQ003]": "I2", + "A03[SQ020]": "I2", + "A03[SQ004]": "I2", + "A03[SQ006]": "I1", + "A03[SQ019]": "I3", + "A03[SQ007]": "I3", + "A03[SQ008]": "I3", + "A03[SQ009]": "I3", + "A03[SQ010]": "I3", + "A03[SQ011]": "", + "A03[SQ014]": "I2", + "A03[SQ018]": "I3", + "A03[SQ021]": "I3", + "A03[SQ012]": "I3", + "A03[SQ025]": "I3", + "A03[SQ024]": "I3", + "A03[SQ015]": "I3", + "A03[SQ016]": "I3", + "A03[SQ017]": "I3", + "A03[SQ022]": "I3", + "A03[SQ023]": "I3", + "A04": "", + "A04[comment]": "", + "A05": "", + "A05[comment]": "", + "A06": "Thank you for how you are impacting and challenging our students!" + } + }, + { + "2": { + "id": "2", + "submitdate": "2023-03-16 16:26:43", + "lastpage": "2", + "startlanguage": "en", + "seed": "313444009", + "startdate": "2023-03-16 16:23:11", + "datestamp": "2023-03-16 16:26:43", + "ipaddr": "10.5.14.6", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "Randall Rinehart", + "A01[SQ002]": "randallrinehart22@gmail.com", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "903-503-1531", + "A01[SQ005]": "", + "A01[SQ004]": "Longview, Texas", + "A01b[SQ001]": "LeTourneau University", + "A01b[SQ002]": "2026", + "A01b[SQ003]": "Computer Science and Engineering", + "A01b[SQ004]": "Bachelor's", + "A01c": "H2", + "A01c[comment]": "Heard about it at an announcement, then a friend told me more and got me interested", + "A02[SQ001]": "", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "", + "A03[SQ001]": "I0", + "A03[SQ013]": "I0", + "A03[SQ002]": "I1", + "A03[SQ003]": "I4", + "A03[SQ020]": "I3", + "A03[SQ004]": "I1", + "A03[SQ006]": "I1", + "A03[SQ019]": "I0", + "A03[SQ007]": "I4", + "A03[SQ008]": "I3", + "A03[SQ009]": "I3", + "A03[SQ010]": "I4", + "A03[SQ011]": "I4", + "A03[SQ014]": "I2", + "A03[SQ018]": "I0", + "A03[SQ021]": "I0", + "A03[SQ012]": "I0", + "A03[SQ025]": "I2", + "A03[SQ024]": "I3", + "A03[SQ015]": "I2", + "A03[SQ016]": "I2", + "A03[SQ017]": "I2", + "A03[SQ022]": "I0", + "A03[SQ023]": "I0", + "A04": "M1", + "A04[comment]": "", + "A05": "L3", + "A05[comment]": "", + "A06": "" + } + }, + { + "3": { + "id": "3", + "submitdate": "2023-03-16 16:31:56", + "lastpage": "2", + "startlanguage": "en", + "seed": "673284565", + "startdate": "2023-03-16 16:24:24", + "datestamp": "2023-03-16 16:31:56", + "ipaddr": "10.5.13.157", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "Richard Nixon", + "A01[SQ002]": "watergatefan1900@outlook.com", + "A01[SQ008]": "n\\/a", + "A01[SQ009]": "None", + "A01[SQ003]": "1(719)-545-6678", + "A01[SQ005]": "Afternoon", + "A01[SQ004]": "The White House, 75603", + "A01b[SQ001]": "East Texas Baptist University", + "A01b[SQ002]": "Never", + "A01b[SQ003]": "Political Science", + "A01b[SQ004]": "Bachelor's of Science (BS)", + "A01c": "H7", + "A01c[comment]": "I heard about LightSys from LightSys. The maximum character limit for this input is about to be tested:\r\nBorder Case errors:\r\n\r\n-False positive with shared Last names: \r\n\r\n-Parent-partner key issue: \r\n *Each data entry corresponds with an identifying key.\r\n *All are given Primary keys for each data entry\r\n *There are a couple of functions that check for duplicates \r\n and assign a corresponding partner key to each duplicate.\r\n *When Primary and partner keys match, flase positives occur?\r\n ~Which function is checking Primary keys vs. partner keys?\r\n ~Which one s assign\\/generate these keys?\r\n ~Which one reads keys and assigns duplicate status?\r\n \r\n\r\n\r\nParent-Partner Key Analysis:\r\n\r\n-Searched GitHub directory for files editing:\r\n * \"parent_key\"\r\n * \"partner_key\"\r\n * \"p_partner_key\"\r\n * Primary Keys\r\n * \"duplicate_checking.qy\"\r\n * \"duplicate_records.qy\"\r\n * \"duplicate_create_pairs.qy\"\r\n *Function that generates table \\u201ctmp_pcl_duplicates\\u201d\r\n * \"tmp_partner_data\"\r\n * \"tmp_partner_condensed\"\r\n * \"tmp_partner_pairs\"\r\n\r\n-Result:\r\n *Checked files shared across Centrallix and Kardia (See final documentation)\r\n *Checked individual files within Kardia application folder on GitHub\r\n\r\n-Talked w\\/ Project Owner (Mr. Greg Beeley):\r\n *Parent keys are a type of foreign key (points back to a primary key)\r\n that relates partner keys (a type of primary key) with the primary \r\n key of each input\r\n *The problem is when the program does not recognize that the parent key\r\n connects two entries and falsely flags them as duplicates (they are \r\n actually intentionally seperate entries)\r\n\r\n-After further investigation, relevant file(s) are;\r\n * \"dup_check.cmp\" (Searches for duplicates)\r\n * \"next_partner.cmp\" (Part of referencing & assigning partner keys) \r\n * \"api_partner.qyt\" (Populates\\/stores partner info including partner key)\r\n * \"duplicate_checking.qy\" (Creates table based off detected duplicates)\r\n\r\n-Needs:\r\n *Program must check against parent keys (located where? Parent keys were never\r\n implemented before the 3\\/14\\/22-3\\/18\\/22 sprint) to prevent false marking of duplicates\r\n *After sorting through code, must find table that partner key is drawn from\r\n *Must also locate table or function that parent key is drawn from\\/given by\r\n\r\n-Concerns:\r\n *What if there are different primary keys for each partner, but other details are mostly\r\n the same? \r\n *Is a Parent key ever assigned to linked entities? \r\n\r\n-Solutions:\r\n *If necessary, add code that creates and assigns a parent key to specific entries\r\n ~How to make sure non-related entities aren't accidentally connected?\r\n ~Manual flagging by user? \r\n >Prompt to flag duplicates as non-related during output\r\n >Added to table during entry of info? Manual entry of automated population?\r\n *Rewrite code to draw from\\/check for parent keys when comparing\\/locating duplicates and\r\n not include them in output (or not pass to table generating function)\r\n ~Use in temp tables of duplicate_checking.qy query and its join function\r\n\r\n\r\n-IMPLEMENTATION (all addresses are under duplicate-checking branches of kardia and centrallix):\r\n \r\n *Edit all files that implement\\/initialize tables to include a category for relate_key (a.k.a. parent_key)\r\n and allow users to set relationships (entries sharing the same relate_key) during initial data entry\r\n ~api_partner.qyt (pulls partner data from a number of tables): kardia\\/kardia-app\\/modules\\/base\\/api_partner.qyt\r\n >tables: \\/apps\\/kardia\\/data\\/Kardia_DB\r\n ~new_partner.cmp (Adds new partner entries, generates partner key, and checks for duplicate partner entries):\r\n kardia\\/kardia-app\\/modules\\/base\\/new_partner.cmp\r\n ~p_partner_relationship.cmp (Sets a relationship value between a partner and person entry):\r\n kardia\\/kardia-app\\/modules\\/base\\/p_partner_relationship.cmp\r\n ~partner_edit.cmp (allows editing of a partner's data): kardia\\/kardia-app\\/modules\\/base\\/partner_edit.cmp\r\n ~person_data.qy (pulls data and keys for a person entry): kardia\\/kardia-app\\/modules\\/base\\/person_data.qy\r\n ~p_person.cmp (creates UI for pulling\\/editing person data): kardia\\/kardia-app\\/modules\\/base\\/p_person.cmp\r\n\r\n *Add a method to duplicate_checking.qy that checks potential duplicates\r\n to see if their relate_key values match and avoid printing these related entries as duplicates.\r\n ~duplicate_checking.qy (evaluates data to detect duplicates and feeds results to tmp_pcl_duplicates):\r\n kardia\\/kardia-app\\/modules\\/base\\/duplicate_checking.qy\r\n\r\n *Add an option (via query, code, and\\/or eventually UI) to flag duplicates listed by duplicate_records.qy\r\n and duplicate_create_pairs.qy as related nonduplicates using the relate_key value\r\n ~duplicate_create_pairs.qy (sorts duplicate results into pairs for comparison): \r\n kardia\\/kardia-app\\/modules\\/base\\/duplicate_create_pairs.qy\r\n >table tmp_sorted_duplicates (where duplicate_create_pairs.qy data is stored):\r\n LOCATION UNKNOWN- Generated\\/destroyed during runtime?\r\n ~duplicate_records.qy (returns data for each \"duplicate\" especially primary and partner keys): \r\n kardia\\/kardia-app\\/modules\\/base\\/duplicate_records.qy\r\n ~dup_check.cmp (presents results of duplicate checking queries): kardia\\/kardia-app\\/modules\\/base\\/dup_check.cmp\r\n ", + "A02[SQ001]": "", + "A02[SQ002]": "", + "A02[SQ003]": "", + "A02[SQ004]": "Y", + "A02[SQ005]": "", + "A02[SQ006]": "Y", + "A03[SQ001]": "I2", + "A03[SQ013]": "I3", + "A03[SQ002]": "I4", + "A03[SQ003]": "I2", + "A03[SQ020]": "I3", + "A03[SQ004]": "I3", + "A03[SQ006]": "I1", + "A03[SQ019]": "I2", + "A03[SQ007]": "I3", + "A03[SQ008]": "I4", + "A03[SQ009]": "I3", + "A03[SQ010]": "I2", + "A03[SQ011]": "I3", + "A03[SQ014]": "I4", + "A03[SQ018]": "I4", + "A03[SQ021]": "I4", + "A03[SQ012]": "I4", + "A03[SQ025]": "I3", + "A03[SQ024]": "I4", + "A03[SQ015]": "I3", + "A03[SQ016]": "I0", + "A03[SQ017]": "I3", + "A03[SQ022]": "I3", + "A03[SQ023]": "I3", + "A04": "M6", + "A04[comment]": "To know Christ and make Him known", + "A05": "", + "A05[comment]": "", + "A06": "); select \"i_crm_partner_import\");" + } + }, + { + "4": { + "id": "4", + "submitdate": "2023-03-16 16:27:54", + "lastpage": "2", + "startlanguage": "en", + "seed": "1274956380", + "startdate": "2023-03-16 16:24:29", + "datestamp": "2023-03-16 16:27:54", + "ipaddr": "10.5.14.0", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "Sarah Kushner", + "A01[SQ002]": "sarahkushner@letu.edu", + "A01[SQ008]": "", + "A01[SQ009]": "", + "A01[SQ003]": "903-239-2940", + "A01[SQ005]": "Daytime", + "A01[SQ004]": "Texas", + "A01b[SQ001]": "LeTourneau University", + "A01b[SQ002]": "2026", + "A01b[SQ003]": "Computer Science and Engineering Technology", + "A01b[SQ004]": "Bachelor of Science", + "A01c": "H3", + "A01c[comment]": "", + "A02[SQ001]": "", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "", + "A02[SQ005]": "", + "A02[SQ006]": "Y", + "A03[SQ001]": "I4", + "A03[SQ013]": "I4", + "A03[SQ002]": "I4", + "A03[SQ003]": "I4", + "A03[SQ020]": "I4", + "A03[SQ004]": "I4", + "A03[SQ006]": "I4", + "A03[SQ019]": "I0", + "A03[SQ007]": "I4", + "A03[SQ008]": "I4", + "A03[SQ009]": "I4", + "A03[SQ010]": "I4", + "A03[SQ011]": "I4", + "A03[SQ014]": "I4", + "A03[SQ018]": "I3", + "A03[SQ021]": "I0", + "A03[SQ012]": "I0", + "A03[SQ025]": "I2", + "A03[SQ024]": "I3", + "A03[SQ015]": "I1", + "A03[SQ016]": "I1", + "A03[SQ017]": "I4", + "A03[SQ022]": "I3", + "A03[SQ023]": "I3", + "A04": "M3", + "A04[comment]": "", + "A05": "L1", + "A05[comment]": "", + "A06": "" + } + }, + { + "5": { + "id": "5", + "submitdate": "2023-03-16 16:35:56", + "lastpage": "2", + "startlanguage": "en", + "seed": "130468167", + "startdate": "2023-03-16 16:32:30", + "datestamp": "2023-03-16 16:35:56", + "ipaddr": "10.5.14.7", + "refurl": "https:\\/\\/10.5.128.100\\/lsv3\\/index.php\\/347787?newtest=Y&lang=en", + "A01[SQ001]": "James Salazar", + "A01[SQ002]": "jamessalazar421@gmail.com", + "A01[SQ008]": "willthiswork", + "A01[SQ009]": "https:\\/\\/jamlsal.itch.io\\/a-grave-mistaik", + "A01[SQ003]": "5122124774", + "A01[SQ005]": "now", + "A01[SQ004]": "here", + "A01b[SQ001]": "YEET", + "A01b[SQ002]": "2000", + "A01b[SQ003]": "MATH", + "A01b[SQ004]": "PHD", + "A01c": "H3", + "A01c[comment]": "Dr. Gowing made me come", + "A02[SQ001]": "Y", + "A02[SQ002]": "Y", + "A02[SQ003]": "", + "A02[SQ004]": "Y", + "A02[SQ005]": "", + "A02[SQ006]": "", + "A03[SQ001]": "I0", + "A03[SQ013]": "I2", + "A03[SQ002]": "I3", + "A03[SQ003]": "I1", + "A03[SQ020]": "I4", + "A03[SQ004]": "", + "A03[SQ006]": "I1", + "A03[SQ019]": "I3", + "A03[SQ007]": "I0", + "A03[SQ008]": "I4", + "A03[SQ009]": "I2", + "A03[SQ010]": "I4", + "A03[SQ011]": "", + "A03[SQ014]": "", + "A03[SQ018]": "I2", + "A03[SQ021]": "I1", + "A03[SQ012]": "", + "A03[SQ025]": "I4", + "A03[SQ024]": "I2", + "A03[SQ015]": "I4", + "A03[SQ016]": "I1", + "A03[SQ017]": "I4", + "A03[SQ022]": "I1", + "A03[SQ023]": "I2", + "A04": "M2", + "A04[comment]": "", + "A05": "L3", + "A05[comment]": "", + "A06": "Will this work" + } + } + ] +} diff --git a/kardia-app/modules/ex_limesurvey/testprogram.qy b/kardia-app/modules/ex_limesurvey/testprogram.qy new file mode 100644 index 00000000..06a4a222 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/testprogram.qy @@ -0,0 +1,9 @@ +$Version=2$ +testprogram "system/query" +{ +sql = " select + i_crm_field_city = 'Longview' + from + /apps/kardia/data/kardia_DB/ldr.qy/rows + "; + } diff --git a/kardia-db/ddl-mysql/tables_create.sql b/kardia-db/ddl-mysql/tables_create.sql index 3baf6772..db0b3b8e 100644 --- a/kardia-db/ddl-mysql/tables_create.sql +++ b/kardia-db/ddl-mysql/tables_create.sql @@ -3787,7 +3787,22 @@ create table i_crm_partner_import ( i_crm_create_partner bit not null, /* whether to create a new partner (and possibly address/location) record (0=no, 1=yes) -- */ i_crm_create_email bit not null, /* whether to create a new email address record for the partner -- */ i_crm_create_phone bit not null, /* whether to create a new phone# record for partner -- */ - i_crm_comment varchar(255) null, /* Comment for newly created record -- */ + i_crm_surname varchar(64) null, /* surname (last name / family name) -- */ + i_crm_given_name varchar(64) null, /* given name / first name. If the source has a middle name, it is combined into this field. -- */ + i_crm_date datetime null, /* date the data was created on the data source -- */ + i_crm_org_name varchar(64) null, /* name of organization -- */ + i_crm_phone varchar(80) null, /* phone number -- */ + i_crm_email varchar(80) null, /* email address -- */ + i_crm_address1 varchar(80) null, /* Address Line 1 -- */ + i_crm_address2 varchar(80) null, /* Address Line 2 -- */ + i_crm_address3 varchar(80) null, /* Address Line 3 -- */ + i_crm_in_care_of varchar(80) null, /* in-care-of -- */ + i_crm_city varchar(80) null, /* City -- */ + i_crm_state_province varchar(64) null, /* State/Province code -- */ + i_crm_postal_code char(12) null, /* Postal (zip) code -- */ + i_crm_country_code char(2) null, /* Country code - ISO-3166-2 with the UK exception. If the import data has a different country code system, it is converted before this value is set. -- */ + i_crm_comment varchar(255) null, /* Comment for the new partner record -- */ + i_crm_addr_comment varchar(255) null, /* Comment for the new address record -- */ s_date_created datetime not null, /* -- */ s_created_by varchar(20) not null, /* -- */ s_date_modified datetime not null, /* -- */ From 0df67dad7cee434b3128c67baa71ce889a652b16 Mon Sep 17 00:00:00 2001 From: Developer - Kardia Date: Fri, 17 Mar 2023 13:44:45 -0600 Subject: [PATCH 15/17] Got the import_insert.qy to work with the import_insert.qy --- kardia-app/modules/ex_limesurvey/connect.qy | 6 +- .../ex_limesurvey/get_survey_responses.http | 8 +-- .../modules/ex_limesurvey/import_insert.qy | 58 ++++++++++++------- 3 files changed, 45 insertions(+), 27 deletions(-) diff --git a/kardia-app/modules/ex_limesurvey/connect.qy b/kardia-app/modules/ex_limesurvey/connect.qy index d5c8ab2b..7cff0b65 100644 --- a/kardia-app/modules/ex_limesurvey/connect.qy +++ b/kardia-app/modules/ex_limesurvey/connect.qy @@ -6,6 +6,8 @@ activity "system/query" { // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + + SURVEY_ID "query/parameter" { type=integer; } sql = "declare object KEY; select @@ -15,11 +17,13 @@ activity "system/query" ; select + name = 'response.json', content_type = 'application/json', inner_type = 'application/json', objcontent = convert(string,from_base64(:result)) from - object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY) + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY+'&SURVEY_ID='+:parameters:SURVEY_ID) "; + name_expression = "'response.json'"; } diff --git a/kardia-app/modules/ex_limesurvey/get_survey_responses.http b/kardia-app/modules/ex_limesurvey/get_survey_responses.http index 49f4c24e..ed683c2d 100644 --- a/kardia-app/modules/ex_limesurvey/get_survey_responses.http +++ b/kardia-app/modules/ex_limesurvey/get_survey_responses.http @@ -12,8 +12,8 @@ get_survey_responses "application/http" protocol = "https"; method = "POST"; allowsubdirs = 1; - cache_min_ttl = 3600000; // one hour - cache_max_ttl = 86400000; // one day + cache_min_ttl = 10000; // 10 sec + cache_max_ttl = 10000; // 10 sec request_content_type="application/json"; @@ -57,8 +57,8 @@ get_survey_responses "application/http" type=string; usage=post; source=none; - default="422914"; - //default=runserver(:parameters:SURVEY_ID); + //default="422914"; + default=runserver(:parameters:SURVEY_ID); } //pamerter 3 "params.2" "http/parameter" { diff --git a/kardia-app/modules/ex_limesurvey/import_insert.qy b/kardia-app/modules/ex_limesurvey/import_insert.qy index 6a463df6..280b1345 100644 --- a/kardia-app/modules/ex_limesurvey/import_insert.qy +++ b/kardia-app/modules/ex_limesurvey/import_insert.qy @@ -1,6 +1,8 @@ $Version=2$ myquery "system/query" - { +{ + SURVEY_ID "query/parameter" { type=integer; } + sql = " INSERT INTO /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows @@ -8,44 +10,56 @@ myquery "system/query" i_crm_email = eval(\":j:'\" + :cit:i_crm_field_email + \"'\", \"O\"), i_crm_comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\"), i_crm_phone = eval(\":j:'\" + :cit:i_crm_field_phone + \"'\", \"O\"), + i_crm_import_status = 'Y', i_crm_create_partner = 0, i_crm_create_email = 0, i_crm_create_phone = 0, + s_date_created = getdate(), s_created_by = 'Dummy User', s_date_modified = getdate(), s_modified_by = 'Dummy User', -- Everything from beginning to first space is considered first name (first word in string) - i_crm_given_name = rtrim(ltrim(substring( - ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")), - 1, - charindex( - ' ', - ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")) - ) - 1 - ))), + i_crm_given_name = condition( + charindex(' ', ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))) == 0, + rtrim(ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))), + rtrim(ltrim(substring( + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")), + 1, + charindex( + ' ', + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")) + ) - 1 + ))) + ), -- Everything from the last space to the end is considered surname (final word in string) - i_crm_surname = rtrim(ltrim(reverse(substring( - reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))), - 1, - charindex( - ' ', - reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))) - ) - 1 - )))), - - i_crm_address1 = eval(\":j:'\" + :cit:i_crm_field_addr1 + \"'\", \"O\") + i_crm_surname = condition( + charindex(' ', reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\")))) == 0, + ltrim(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\"))), + rtrim(ltrim(reverse(substring( + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\"))), + 1, + charindex( + ' ', + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\"))) + ) - 1 + )))) + ), + + i_crm_address1 = eval(\":j:'\" + :cit:i_crm_field_addr1 + \"'\", \"O\"), + i_crm_address2 = eval(\":j:'\" + :cit:i_crm_field_addr2 + \"'\", \"O\"), + i_crm_address3 = eval(\":j:'\" + :cit:i_crm_field_addr3 + \"'\", \"O\") FROM IDENTITY - WILDCARD ./422914.json/responses/* j + WILDCARD expression('/apps/kardia/modules/ex_limesurvey/connect.qy?SURVEY_ID='+:parameters:SURVEY_ID+'/response.json/responses/*') j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit WHERE - :cit:i_crm_import_type_id = 422914 - AND + :cit:i_crm_import_type_id = :parameters:SURVEY_ID + AND :j:submitdate IS NOT NULL "; } \ No newline at end of file From ad3b30de6a6da3a6df43d5dbe7de02c8ad90a73a Mon Sep 17 00:00:00 2001 From: jamlsal <89665566+jamlsal@users.noreply.github.com> Date: Fri, 17 Mar 2023 17:26:59 -0500 Subject: [PATCH 16/17] Create README.md Made a readme file to explain usage. --- kardia-app/modules/ex_limesurvey/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 kardia-app/modules/ex_limesurvey/README.md diff --git a/kardia-app/modules/ex_limesurvey/README.md b/kardia-app/modules/ex_limesurvey/README.md new file mode 100644 index 00000000..d3eee65a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/README.md @@ -0,0 +1,19 @@ +# Kardia and LimeSurvey Integration + +## Usage + +In test_obj under the ex_limesurvey directory run `query exec ./import_insert.qy SURVEY_ID=` + +## Current working files + +- connect.qy +- get_key.http +- get_survey_responses.http +- import_insert.qy + +## Future use files +- get_list_of_survey.http + +## Other files + +All other files are for testing and development and are not used in the accrual integration. From 05f7efc8ec7cb58bfde527ceb8997c9273393426 Mon Sep 17 00:00:00 2001 From: Developer - Kardia Date: Fri, 17 Mar 2023 16:54:09 -0600 Subject: [PATCH 17/17] Adde option_import_insert.qy --- .../ex_limesurvey/.#james_import_insert.qy | 1 + kardia-app/modules/ex_limesurvey/347787.json | 1 + kardia-app/modules/ex_limesurvey/726131.json | 460 +++++++++++++++++- .../modules/ex_limesurvey/gregconnect.qy | 5 +- .../modules/ex_limesurvey/import_insert.qy | 6 +- .../ex_limesurvey/james_import_insert.qy | 12 +- .../modules/ex_limesurvey/james_test.qy | 21 + .../modules/ex_limesurvey/ldr_connect.qy | 40 ++ .../ex_limesurvey/option_import_insert.qy | 38 ++ .../ex_limesurvey/randall_import_insert.qy | 65 +++ .../modules/ex_limesurvey/test_connect.qy | 29 ++ .../modules/ex_limesurvey/test_connect.qy~ | 29 ++ ..._comment.qy => test_hardcode_survey_id.qy} | 6 +- 13 files changed, 700 insertions(+), 13 deletions(-) create mode 120000 kardia-app/modules/ex_limesurvey/.#james_import_insert.qy create mode 100644 kardia-app/modules/ex_limesurvey/347787.json create mode 100644 kardia-app/modules/ex_limesurvey/james_test.qy create mode 100644 kardia-app/modules/ex_limesurvey/ldr_connect.qy create mode 100644 kardia-app/modules/ex_limesurvey/option_import_insert.qy create mode 100644 kardia-app/modules/ex_limesurvey/randall_import_insert.qy create mode 100644 kardia-app/modules/ex_limesurvey/test_connect.qy create mode 100644 kardia-app/modules/ex_limesurvey/test_connect.qy~ rename kardia-app/modules/ex_limesurvey/{rsr_select_comment.qy => test_hardcode_survey_id.qy} (53%) diff --git a/kardia-app/modules/ex_limesurvey/.#james_import_insert.qy b/kardia-app/modules/ex_limesurvey/.#james_import_insert.qy new file mode 120000 index 00000000..79795507 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/.#james_import_insert.qy @@ -0,0 +1 @@ +james@james-fedora.444826027210652483 \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/347787.json b/kardia-app/modules/ex_limesurvey/347787.json new file mode 100644 index 00000000..78649ccb --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/347787.json @@ -0,0 +1 @@ +{"responses": [{"1":{"id":"1","submitdate":"2023-03-16 16:24:24","lastpage":"2","startlanguage":"en","seed":"1547144365","startdate":"2023-03-16 16:21:00","datestamp":"2023-03-16 16:24:24","ipaddr":"10.5.14.5","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/admin\/survey\/sa\/view\/surveyid\/347787","A01[SQ001]":"Lara D Rose","A01[SQ002]":"lararose@letu.edu","A01[SQ008]":"","A01[SQ009]":"","A01[SQ003]":"6077689205","A01[SQ005]":"","A01[SQ004]":"","A01b[SQ001]":"LeTourneau University","A01b[SQ002]":"1991","A01b[SQ003]":"CSMA","A01b[SQ004]":"Bachelor's","A01c":"H3","A01c[comment]":"","A02[SQ001]":"","A02[SQ002]":"Y","A02[SQ003]":"","A02[SQ004]":"","A02[SQ005]":"","A02[SQ006]":"Y","A03[SQ001]":"I0","A03[SQ013]":"I0","A03[SQ002]":"I2","A03[SQ003]":"I2","A03[SQ020]":"I2","A03[SQ004]":"I2","A03[SQ006]":"I1","A03[SQ019]":"I3","A03[SQ007]":"I3","A03[SQ008]":"I3","A03[SQ009]":"I3","A03[SQ010]":"I3","A03[SQ011]":"","A03[SQ014]":"I2","A03[SQ018]":"I3","A03[SQ021]":"I3","A03[SQ012]":"I3","A03[SQ025]":"I3","A03[SQ024]":"I3","A03[SQ015]":"I3","A03[SQ016]":"I3","A03[SQ017]":"I3","A03[SQ022]":"I3","A03[SQ023]":"I3","A04":"","A04[comment]":"","A05":"","A05[comment]":"","A06":"Thank you for how you are impacting and challenging our students!"}},{"2":{"id":"2","submitdate":"2023-03-16 16:26:43","lastpage":"2","startlanguage":"en","seed":"313444009","startdate":"2023-03-16 16:23:11","datestamp":"2023-03-16 16:26:43","ipaddr":"10.5.14.6","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/347787?newtest=Y&lang=en","A01[SQ001]":"Randall Rinehart","A01[SQ002]":"randallrinehart22@gmail.com","A01[SQ008]":"","A01[SQ009]":"","A01[SQ003]":"903-503-1531","A01[SQ005]":"","A01[SQ004]":"Longview, Texas","A01b[SQ001]":"LeTourneau University","A01b[SQ002]":"2026","A01b[SQ003]":"Computer Science and Engineering","A01b[SQ004]":"Bachelor's","A01c":"H2","A01c[comment]":"Heard about it at an announcement, then a friend told me more and got me interested","A02[SQ001]":"","A02[SQ002]":"Y","A02[SQ003]":"","A02[SQ004]":"","A02[SQ005]":"","A02[SQ006]":"","A03[SQ001]":"I0","A03[SQ013]":"I0","A03[SQ002]":"I1","A03[SQ003]":"I4","A03[SQ020]":"I3","A03[SQ004]":"I1","A03[SQ006]":"I1","A03[SQ019]":"I0","A03[SQ007]":"I4","A03[SQ008]":"I3","A03[SQ009]":"I3","A03[SQ010]":"I4","A03[SQ011]":"I4","A03[SQ014]":"I2","A03[SQ018]":"I0","A03[SQ021]":"I0","A03[SQ012]":"I0","A03[SQ025]":"I2","A03[SQ024]":"I3","A03[SQ015]":"I2","A03[SQ016]":"I2","A03[SQ017]":"I2","A03[SQ022]":"I0","A03[SQ023]":"I0","A04":"M1","A04[comment]":"","A05":"L3","A05[comment]":"","A06":""}},{"3":{"id":"3","submitdate":"2023-03-16 16:31:56","lastpage":"2","startlanguage":"en","seed":"673284565","startdate":"2023-03-16 16:24:24","datestamp":"2023-03-16 16:31:56","ipaddr":"10.5.13.157","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/347787?newtest=Y&lang=en","A01[SQ001]":"Richard Nixon","A01[SQ002]":"watergatefan1900@outlook.com","A01[SQ008]":"n\/a","A01[SQ009]":"None","A01[SQ003]":"1(719)-545-6678","A01[SQ005]":"Afternoon","A01[SQ004]":"The White House, 75603","A01b[SQ001]":"East Texas Baptist University","A01b[SQ002]":"Never","A01b[SQ003]":"Political Science","A01b[SQ004]":"Bachelor's of Science (BS)","A01c":"H7","A01c[comment]":"I heard about LightSys from LightSys. The maximum character limit for this input is about to be tested:\r\nBorder Case errors:\r\n\r\n-False positive with shared Last names: \r\n\r\n-Parent-partner key issue: \r\n\t*Each data entry corresponds with an identifying key.\r\n\t*All are given Primary keys for each data entry\r\n\t*There are a couple of functions that check for duplicates \r\n\t and assign a corresponding partner key to each duplicate.\r\n\t*When Primary and partner keys match, flase positives occur?\r\n\t\t~Which function is checking Primary keys vs. partner keys?\r\n\t\t~Which one s assign\/generate these keys?\r\n\t\t~Which one reads keys and assigns duplicate status?\r\n\t\r\n\r\n\r\nParent-Partner Key Analysis:\r\n\r\n-Searched GitHub directory for files editing:\r\n\t* \"parent_key\"\r\n\t* \"partner_key\"\r\n\t* \"p_partner_key\"\r\n\t* Primary Keys\r\n\t* \"duplicate_checking.qy\"\r\n\t* \"duplicate_records.qy\"\r\n\t* \"duplicate_create_pairs.qy\"\r\n\t*Function that generates table \u201ctmp_pcl_duplicates\u201d\r\n\t* \"tmp_partner_data\"\r\n\t* \"tmp_partner_condensed\"\r\n\t* \"tmp_partner_pairs\"\r\n\r\n-Result:\r\n\t*Checked files shared across Centrallix and Kardia (See final documentation)\r\n\t*Checked individual files within Kardia application folder on GitHub\r\n\r\n-Talked w\/ Project Owner (Mr. Greg Beeley):\r\n\t*Parent keys are a type of foreign key (points back to a primary key)\r\n\t that relates partner keys (a type of primary key) with the primary \r\n\t key of each input\r\n\t*The problem is when the program does not recognize that the parent key\r\n\t connects two entries and falsely flags them as duplicates (they are \r\n\t actually intentionally seperate entries)\r\n\r\n-After further investigation, relevant file(s) are;\r\n\t* \"dup_check.cmp\" (Searches for duplicates)\r\n\t* \"next_partner.cmp\" (Part of referencing & assigning partner keys) \r\n\t* \"api_partner.qyt\" (Populates\/stores partner info including partner key)\r\n\t* \"duplicate_checking.qy\" (Creates table based off detected duplicates)\r\n\r\n-Needs:\r\n\t*Program must check against parent keys (located where? Parent keys were never\r\n\t implemented before the 3\/14\/22-3\/18\/22 sprint) to prevent false marking of duplicates\r\n\t*After sorting through code, must find table that partner key is drawn from\r\n\t*Must also locate table or function that parent key is drawn from\/given by\r\n\r\n-Concerns:\r\n\t*What if there are different primary keys for each partner, but other details are mostly\r\n\t the same? \r\n\t*Is a Parent key ever assigned to linked entities? \r\n\r\n-Solutions:\r\n\t*If necessary, add code that creates and assigns a parent key to specific entries\r\n\t\t~How to make sure non-related entities aren't accidentally connected?\r\n\t\t~Manual flagging by user? \r\n\t\t\t>Prompt to flag duplicates as non-related during output\r\n\t\t\t>Added to table during entry of info? Manual entry of automated population?\r\n\t*Rewrite code to draw from\/check for parent keys when comparing\/locating duplicates and\r\n\t not include them in output (or not pass to table generating function)\r\n\t\t~Use in temp tables of duplicate_checking.qy query and its join function\r\n\r\n\r\n-IMPLEMENTATION (all addresses are under duplicate-checking branches of kardia and centrallix):\r\n\t\r\n\t*Edit all files that implement\/initialize tables to include a category for relate_key (a.k.a. parent_key)\r\n\t and allow users to set relationships (entries sharing the same relate_key) during initial data entry\r\n\t\t~api_partner.qyt (pulls partner data from a number of tables): kardia\/kardia-app\/modules\/base\/api_partner.qyt\r\n\t\t\t>tables: \/apps\/kardia\/data\/Kardia_DB\r\n\t\t~new_partner.cmp (Adds new partner entries, generates partner key, and checks for duplicate partner entries):\r\n\t\t kardia\/kardia-app\/modules\/base\/new_partner.cmp\r\n\t\t~p_partner_relationship.cmp (Sets a relationship value between a partner and person entry):\r\n\t\t kardia\/kardia-app\/modules\/base\/p_partner_relationship.cmp\r\n\t\t~partner_edit.cmp (allows editing of a partner's data): kardia\/kardia-app\/modules\/base\/partner_edit.cmp\r\n\t\t~person_data.qy (pulls data and keys for a person entry): kardia\/kardia-app\/modules\/base\/person_data.qy\r\n\t\t~p_person.cmp (creates UI for pulling\/editing person data): kardia\/kardia-app\/modules\/base\/p_person.cmp\r\n\r\n\t*Add a method to duplicate_checking.qy that checks potential duplicates\r\n\t to see if their relate_key values match and avoid printing these related entries as duplicates.\r\n\t\t~duplicate_checking.qy (evaluates data to detect duplicates and feeds results to tmp_pcl_duplicates):\r\n\t\t kardia\/kardia-app\/modules\/base\/duplicate_checking.qy\r\n\r\n\t*Add an option (via query, code, and\/or eventually UI) to flag duplicates listed by duplicate_records.qy\r\n\t and duplicate_create_pairs.qy as related nonduplicates using the relate_key value\r\n\t\t~duplicate_create_pairs.qy (sorts duplicate results into pairs for comparison): \r\n\t\t kardia\/kardia-app\/modules\/base\/duplicate_create_pairs.qy\r\n\t\t\t>table tmp_sorted_duplicates (where duplicate_create_pairs.qy data is stored):\r\n\t\t\t LOCATION UNKNOWN- Generated\/destroyed during runtime?\r\n\t\t~duplicate_records.qy (returns data for each \"duplicate\" especially primary and partner keys): \r\n\t\t kardia\/kardia-app\/modules\/base\/duplicate_records.qy\r\n\t\t~dup_check.cmp (presents results of duplicate checking queries): kardia\/kardia-app\/modules\/base\/dup_check.cmp\r\n\t","A02[SQ001]":"","A02[SQ002]":"","A02[SQ003]":"","A02[SQ004]":"Y","A02[SQ005]":"","A02[SQ006]":"Y","A03[SQ001]":"I2","A03[SQ013]":"I3","A03[SQ002]":"I4","A03[SQ003]":"I2","A03[SQ020]":"I3","A03[SQ004]":"I3","A03[SQ006]":"I1","A03[SQ019]":"I2","A03[SQ007]":"I3","A03[SQ008]":"I4","A03[SQ009]":"I3","A03[SQ010]":"I2","A03[SQ011]":"I3","A03[SQ014]":"I4","A03[SQ018]":"I4","A03[SQ021]":"I4","A03[SQ012]":"I4","A03[SQ025]":"I3","A03[SQ024]":"I4","A03[SQ015]":"I3","A03[SQ016]":"I0","A03[SQ017]":"I3","A03[SQ022]":"I3","A03[SQ023]":"I3","A04":"M6","A04[comment]":"To know Christ and make Him known","A05":"","A05[comment]":"","A06":"); select \"i_crm_partner_import\");"}},{"4":{"id":"4","submitdate":"2023-03-16 16:27:54","lastpage":"2","startlanguage":"en","seed":"1274956380","startdate":"2023-03-16 16:24:29","datestamp":"2023-03-16 16:27:54","ipaddr":"10.5.14.0","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/347787?newtest=Y&lang=en","A01[SQ001]":"Sarah Kushner","A01[SQ002]":"sarahkushner@letu.edu","A01[SQ008]":"","A01[SQ009]":"","A01[SQ003]":"903-239-2940","A01[SQ005]":"Daytime","A01[SQ004]":"Texas","A01b[SQ001]":"LeTourneau University","A01b[SQ002]":"2026","A01b[SQ003]":"Computer Science and Engineering Technology","A01b[SQ004]":"Bachelor of Science","A01c":"H3","A01c[comment]":"","A02[SQ001]":"","A02[SQ002]":"Y","A02[SQ003]":"","A02[SQ004]":"","A02[SQ005]":"","A02[SQ006]":"Y","A03[SQ001]":"I4","A03[SQ013]":"I4","A03[SQ002]":"I4","A03[SQ003]":"I4","A03[SQ020]":"I4","A03[SQ004]":"I4","A03[SQ006]":"I4","A03[SQ019]":"I0","A03[SQ007]":"I4","A03[SQ008]":"I4","A03[SQ009]":"I4","A03[SQ010]":"I4","A03[SQ011]":"I4","A03[SQ014]":"I4","A03[SQ018]":"I3","A03[SQ021]":"I0","A03[SQ012]":"I0","A03[SQ025]":"I2","A03[SQ024]":"I3","A03[SQ015]":"I1","A03[SQ016]":"I1","A03[SQ017]":"I4","A03[SQ022]":"I3","A03[SQ023]":"I3","A04":"M3","A04[comment]":"","A05":"L1","A05[comment]":"","A06":""}},{"5":{"id":"5","submitdate":"2023-03-16 16:35:56","lastpage":"2","startlanguage":"en","seed":"130468167","startdate":"2023-03-16 16:32:30","datestamp":"2023-03-16 16:35:56","ipaddr":"10.5.14.7","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/347787?newtest=Y&lang=en","A01[SQ001]":"James Salazar","A01[SQ002]":"jamessalazar421@gmail.com","A01[SQ008]":"willthiswork","A01[SQ009]":"https:\/\/jamlsal.itch.io\/a-grave-mistaik","A01[SQ003]":"5122124774","A01[SQ005]":"now","A01[SQ004]":"here","A01b[SQ001]":"YEET","A01b[SQ002]":"2000","A01b[SQ003]":"MATH","A01b[SQ004]":"PHD","A01c":"H3","A01c[comment]":"Dr. Gowing made me come","A02[SQ001]":"Y","A02[SQ002]":"Y","A02[SQ003]":"","A02[SQ004]":"Y","A02[SQ005]":"","A02[SQ006]":"","A03[SQ001]":"I0","A03[SQ013]":"I2","A03[SQ002]":"I3","A03[SQ003]":"I1","A03[SQ020]":"I4","A03[SQ004]":"","A03[SQ006]":"I1","A03[SQ019]":"I3","A03[SQ007]":"I0","A03[SQ008]":"I4","A03[SQ009]":"I2","A03[SQ010]":"I4","A03[SQ011]":"","A03[SQ014]":"","A03[SQ018]":"I2","A03[SQ021]":"I1","A03[SQ012]":"","A03[SQ025]":"I4","A03[SQ024]":"I2","A03[SQ015]":"I4","A03[SQ016]":"I1","A03[SQ017]":"I4","A03[SQ022]":"I1","A03[SQ023]":"I2","A04":"M2","A04[comment]":"","A05":"L3","A05[comment]":"","A06":"Will this work"}},{"6":{"id":"6","submitdate":null,"lastpage":null,"startlanguage":"en","seed":"1642284294","startdate":"2023-03-16 21:46:54","datestamp":"2023-03-16 21:46:54","ipaddr":"10.5.14.5","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/admin\/survey\/sa\/view\/surveyid\/347787","A01[SQ001]":null,"A01[SQ002]":null,"A01[SQ008]":null,"A01[SQ009]":null,"A01[SQ003]":null,"A01[SQ005]":null,"A01[SQ004]":null,"A01b[SQ001]":null,"A01b[SQ002]":null,"A01b[SQ003]":null,"A01b[SQ004]":null,"A01c":null,"A01c[comment]":null,"A02[SQ001]":null,"A02[SQ002]":null,"A02[SQ003]":null,"A02[SQ004]":null,"A02[SQ005]":null,"A02[SQ006]":null,"A03[SQ001]":null,"A03[SQ013]":null,"A03[SQ002]":null,"A03[SQ003]":null,"A03[SQ020]":null,"A03[SQ004]":null,"A03[SQ006]":null,"A03[SQ019]":null,"A03[SQ007]":null,"A03[SQ008]":null,"A03[SQ009]":null,"A03[SQ010]":null,"A03[SQ011]":null,"A03[SQ014]":null,"A03[SQ018]":null,"A03[SQ021]":null,"A03[SQ012]":null,"A03[SQ025]":null,"A03[SQ024]":null,"A03[SQ015]":null,"A03[SQ016]":null,"A03[SQ017]":null,"A03[SQ022]":null,"A03[SQ023]":null,"A04":null,"A04[comment]":null,"A05":null,"A05[comment]":null,"A06":null}},{"7":{"id":"7","submitdate":"2023-03-16 22:35:29","lastpage":"2","startlanguage":"en","seed":"1105781397","startdate":"2023-03-16 21:47:01","datestamp":"2023-03-16 22:35:29","ipaddr":"10.5.14.6","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/347787?newtest=Y&lang=en","A01[SQ001]":" John Jacob Jingleheimer Schmidt ","A01[SQ002]":"johnjs42@hotmail.com","A01[SQ008]":"","A01[SQ009]":"","A01[SQ003]":"903-555-1234","A01[SQ005]":"","A01[SQ004]":"Elmira, New York","A01b[SQ001]":"Kilgore College","A01b[SQ002]":"2023","A01b[SQ003]":"Mechatronics","A01b[SQ004]":"BS","A01c":"H1","A01c[comment]":"Please enter your comment here:","A02[SQ001]":"Y","A02[SQ002]":"Y","A02[SQ003]":"Y","A02[SQ004]":"","A02[SQ005]":"","A02[SQ006]":"","A03[SQ001]":"I0","A03[SQ013]":"","A03[SQ002]":"","A03[SQ003]":"","A03[SQ020]":"","A03[SQ004]":"I2","A03[SQ006]":"","A03[SQ019]":"","A03[SQ007]":"I1","A03[SQ008]":"","A03[SQ009]":"I4","A03[SQ010]":"I0","A03[SQ011]":"","A03[SQ014]":"","A03[SQ018]":"","A03[SQ021]":"I1","A03[SQ012]":"I2","A03[SQ025]":"","A03[SQ024]":"I1","A03[SQ015]":"I3","A03[SQ016]":"","A03[SQ017]":"I1","A03[SQ022]":"I1","A03[SQ023]":"I1","A04":"M1","A04[comment]":"","A05":"L1","A05[comment]":"","A06":"Other Comments you have for us:"}},{"8":{"id":"8","submitdate":"2023-03-16 22:34:36","lastpage":"2","startlanguage":"en","seed":"1362575118","startdate":"2023-03-16 22:32:00","datestamp":"2023-03-16 22:34:36","ipaddr":"10.5.14.5","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/admin\/survey\/sa\/view\/surveyid\/347787","A01[SQ001]":" Robert Nelson Wallace ","A01[SQ002]":"robertnelsonwallace@gmail.com","A01[SQ008]":"","A01[SQ009]":"","A01[SQ003]":"770-228-3267","A01[SQ005]":"6 AM","A01[SQ004]":"40 Leianne Drive, Griffin, GA 30223 USA","A01b[SQ001]":"LeTourneau University ","A01b[SQ002]":"1945","A01b[SQ003]":"Business","A01b[SQ004]":"MBA","A01c":"H2","A01c[comment]":"","A02[SQ001]":"","A02[SQ002]":"","A02[SQ003]":"","A02[SQ004]":"Y","A02[SQ005]":"","A02[SQ006]":"","A03[SQ001]":"I4","A03[SQ013]":"","A03[SQ002]":"","A03[SQ003]":"","A03[SQ020]":"","A03[SQ004]":"","A03[SQ006]":"","A03[SQ019]":"","A03[SQ007]":"","A03[SQ008]":"","A03[SQ009]":"","A03[SQ010]":"","A03[SQ011]":"","A03[SQ014]":"","A03[SQ018]":"","A03[SQ021]":"","A03[SQ012]":"","A03[SQ025]":"","A03[SQ024]":"","A03[SQ015]":"","A03[SQ016]":"","A03[SQ017]":"","A03[SQ022]":"","A03[SQ023]":"","A04":"M2","A04[comment]":"","A05":"L4","A05[comment]":"","A06":"Jesus was a carpenter."}},{"9":{"id":"9","submitdate":null,"lastpage":null,"startlanguage":"en","seed":"633582210","startdate":"2023-03-17 19:59:50","datestamp":"2023-03-17 19:59:50","ipaddr":"10.5.14.5","refurl":"https:\/\/10.5.128.100\/lsv3\/index.php\/admin\/survey\/sa\/view\/surveyid\/347787","A01[SQ001]":null,"A01[SQ002]":null,"A01[SQ008]":null,"A01[SQ009]":null,"A01[SQ003]":null,"A01[SQ005]":null,"A01[SQ004]":null,"A01b[SQ001]":null,"A01b[SQ002]":null,"A01b[SQ003]":null,"A01b[SQ004]":null,"A01c":null,"A01c[comment]":null,"A02[SQ001]":null,"A02[SQ002]":null,"A02[SQ003]":null,"A02[SQ004]":null,"A02[SQ005]":null,"A02[SQ006]":null,"A03[SQ001]":null,"A03[SQ013]":null,"A03[SQ002]":null,"A03[SQ003]":null,"A03[SQ020]":null,"A03[SQ004]":null,"A03[SQ006]":null,"A03[SQ019]":null,"A03[SQ007]":null,"A03[SQ008]":null,"A03[SQ009]":null,"A03[SQ010]":null,"A03[SQ011]":null,"A03[SQ014]":null,"A03[SQ018]":null,"A03[SQ021]":null,"A03[SQ012]":null,"A03[SQ025]":null,"A03[SQ024]":null,"A03[SQ015]":null,"A03[SQ016]":null,"A03[SQ017]":null,"A03[SQ022]":null,"A03[SQ023]":null,"A04":null,"A04[comment]":null,"A05":null,"A05[comment]":null,"A06":null}}]} diff --git a/kardia-app/modules/ex_limesurvey/726131.json b/kardia-app/modules/ex_limesurvey/726131.json index 0a35fa7a..4546dc1a 100644 --- a/kardia-app/modules/ex_limesurvey/726131.json +++ b/kardia-app/modules/ex_limesurvey/726131.json @@ -1 +1,459 @@ -{"responses": [{"1":{"id":"1","submitdate":"2023-03-16 23:33:17","lastpage":"8","startlanguage":"en","seed":"1722147725","startdate":"2023-03-16 23:30:16","datestamp":"2023-03-16 23:33:17","ipaddr":"10.5.14.5","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Lara","Name2":"Rose","Name3":"","Email[1]":"LaraRose@letu.edu","Email[2]":"LaraRose@letu.edu","Gender":"F","ICCM":"N","Shirt":"A1","Shirt[comment]":"","OrgName":"LETU","OrgWeb":"https:\/\/www.letu.edu","OrgType":"A3","OrgAddress[SQ001]":"2100 S Mobberly Ave","OrgAddress[SQ002]":"Longview","OrgAddress[SQ003]":"Texas","OrgAddress[SQ004]":"75602","OrgAddress[SQ005]":"United States","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"Y","NonAttendingNames1[SQ001]":"Dan Rose","NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"Dan","BYOL":"Y","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"N","HousingCost":"50","SubTotal1":"375","SubTotal2":"150","SubTotal":"525","EarlyRegSelf":"93.75","EarlyRegNonAttending":"37.5","SubTotal3":"393.75","DiscountCode":"XOIF","Discount1":"0","TotalCost":"393.75","EndCost":"","Travel35":"Y","Travel4":"I'm special","Travel5[SQ001]":"Dan","Travel5[SQ002]":"607-768-5223","Travel5[SQ003]":"903-233-3210","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A3","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"Y","Final2":"A1","EndRegText":""}},{"2":{"id":"2","submitdate":"2023-03-16 23:36:20","lastpage":"8","startlanguage":"en","seed":"110849489","startdate":"2023-03-16 23:31:02","datestamp":"2023-03-16 23:36:20","ipaddr":"10.5.14.0","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Achua","Name2":"Myanmar","Name3":"Matrioshka Brain","Email[1]":"myemail@fakemail.com","Email[2]":"myemail@fakemail.com","Gender":"F","ICCM":"N","Shirt":"A6","Shirt[comment]":"","OrgName":"Universidad De Finland","OrgWeb":"Finald.net","OrgType":"A3","OrgAddress[SQ001]":"3100 Street Lane","OrgAddress[SQ002]":"CityTown","OrgAddress[SQ003]":"Oklahoma","OrgAddress[SQ004]":"543210","OrgAddress[SQ005]":"Turkey","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"Phil, my pet penguin","BYOL":"N","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"Y","HousingCost":"50","SubTotal1":"375","SubTotal2":"0","SubTotal":"375","EarlyRegSelf":"93.75","EarlyRegNonAttending":"","SubTotal3":"306.25","DiscountCode":"code.hakk","Discount1":"25","TotalCost":"281.25","EndCost":"","Travel35":"N","Travel4":null,"Travel5[SQ001]":"Genghis Kahn","Travel5[SQ002]":"1-800-sword-org","Travel5[SQ003]":"1-870-conquer-world","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A4","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"N","Final2":"A1","EndRegText":""}},{"3":{"id":"3","submitdate":"2023-03-16 23:45:08","lastpage":"8","startlanguage":"en","seed":"2064732826","startdate":"2023-03-16 23:31:22","datestamp":"2023-03-16 23:45:08","ipaddr":"10.5.13.157","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Nathan","Name2":"Moyes","Name3":"","Email[1]":"nathanmoyes@letu.edu","Email[2]":"nathanmoyes@letu.edu","Gender":"M","ICCM":"N","Shirt":"A7","Shirt[comment]":"Shirts are for the weak.","OrgName":"LeTourneau University, **THE** Christian Polytechnic University","OrgWeb":"https:\/\/github.com\/Natmoy-LETU\/kardia_LimeSurvey\/tree\/master\/kardia-app\/modules\/ex_limesurvey","OrgType":"A6","OrgAddress[SQ001]":"10 Downing Street","OrgAddress[SQ002]":"London","OrgAddress[SQ003]":"","OrgAddress[SQ004]":"","OrgAddress[SQ005]":"United Kingdom","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A2","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"Xi Jinping","BYOL":"Y","Reg3":"A2","Reg4":"A5","Reg5":"A2","Travel1":"A2","Travel2":"Jetpack","MissioNexus":"Y","HousingCost":"50","SubTotal1":"520","SubTotal2":"0","SubTotal":"520","EarlyRegSelf":"130","EarlyRegNonAttending":"","SubTotal3":"390","DiscountCode":"Not Applicable","Discount1":"25","TotalCost":"365","EndCost":"","Travel35":"Y","Travel4":"None. Just Testing.","Travel5[SQ001]":"Joe Biden","Travel5[SQ002]":"202-456-1111","Travel5[SQ003]":"202-456-6213","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A4","Privacy3[SQ005]":"Y","Privacy3[SQ001]":null,"Privacy3[SQ002]":null,"Privacy3[SQ003]":null,"Privacy3[SQ004]":null,"Privacy4":"N","Final2":"A1","EndRegText":""}},{"4":{"id":"4","submitdate":"2023-03-16 23:41:51","lastpage":"8","startlanguage":"en","seed":"274544989","startdate":"2023-03-16 23:31:49","datestamp":"2023-03-16 23:41:51","ipaddr":"10.5.14.6","BaseCost":"225","Intro1":"","Promise1":"","Name1":"Randall","Name2":"Rinehart","Name3":"Randy","Email[1]":"randallrinehart@letu.edu","Email[2]":"randallrinehart@letu.edu","Gender":"M","ICCM":"N","Shirt":"A3","Shirt[comment]":"First Comment","OrgName":"LeTourneau University","OrgWeb":"letu.edu","OrgType":"A3","OrgAddress[SQ001]":"250 Oakridge Lane","OrgAddress[SQ002]":"Longview","OrgAddress[SQ003]":"Texas","OrgAddress[SQ004]":"75605","OrgAddress[SQ005]":"United States","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"James Salazar","BYOL":"Y","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"N","HousingCost":"50","SubTotal1":"375","SubTotal2":"0","SubTotal":"375","EarlyRegSelf":"93.75","EarlyRegNonAttending":"","SubTotal3":"281.25","DiscountCode":"","Discount1":"0","TotalCost":"281.25","EndCost":"","Travel35":"N","Travel4":null,"Travel5[SQ001]":"Jaime Rinehart","Travel5[SQ002]":"9038062536","Travel5[SQ003]":"9038062536","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A1","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"Y","Final2":"A1","EndRegText":""}},{"5":{"id":"5","submitdate":"2023-03-16 23:43:32","lastpage":"8","startlanguage":"en","seed":"1330257394","startdate":"2023-03-16 23:33:42","datestamp":"2023-03-16 23:43:32","ipaddr":"10.5.14.7","BaseCost":"225","Intro1":"","Promise1":"","Name1":"james","Name2":"salazar","Name3":"jamlsal","Email[1]":"jamessalazar@letu.edu","Email[2]":"jamessalazar@letu.edu","Gender":"M","ICCM":"N","Shirt":"A3","Shirt[comment]":"make it transparent","OrgName":"ham","OrgWeb":"google.c0m","OrgType":"A5","OrgAddress[SQ001]":"2100 S. Mobberly Ave","OrgAddress[SQ002]":"Longview","OrgAddress[SQ003]":"TX","OrgAddress[SQ004]":"75602","OrgAddress[SQ005]":"USA","PreRegCutoffDate":"2022-12-01","EarlyBirdCutoffDate":"2023-04-15","Reg2":"A1","Reg6":"N","NonAttendingNames1[SQ001]":null,"NonAttendingNames1[SQ002]":null,"NonAttendingNames1[SQ003]":null,"NonAttendingNames1[SQ004]":null,"NonAttendingNames1[SQ005]":null,"NonAttendingNames1[SQ006]":null,"Reg7":"N","NonAttendingNames2[SQ001]":null,"NonAttendingNames2[SQ002]":null,"NonAttendingNames2[SQ003]":null,"NonAttendingNames2[SQ004]":null,"NonAttendingNames2[SQ005]":null,"NonAttendingNames2[SQ006]":null,"Reg8":"A2","Travel3":"kjhhjlhl","BYOL":"N","Reg3":null,"Reg4":null,"Reg5":null,"Travel1":"A4","Travel2":null,"MissioNexus":"Y","HousingCost":"50","SubTotal1":"375","SubTotal2":"0","SubTotal":"375","EarlyRegSelf":"93.75","EarlyRegNonAttending":"","SubTotal3":"306.25","DiscountCode":"","Discount1":"25","TotalCost":"281.25","EndCost":"","Travel35":"Y","Travel4":"lkjjklj;klj;l","Travel5[SQ001]":"jlkjlkkljl","Travel5[SQ002]":"9009009999","Travel5[SQ003]":"9009009999","Shape":null,"Shape2":null,"Shape3":null,"Shape4":null,"Shape5":null,"Shape6":null,"Shape7":null,"Privacy1":"","PrivacyNameRadio":"A3","Privacy3[SQ005]":"","Privacy3[SQ001]":"Y","Privacy3[SQ002]":"Y","Privacy3[SQ003]":"Y","Privacy3[SQ004]":"Y","Privacy4":"Y","Final2":"A1","EndRegText":""}}]} +{ + "responses": [ + { + "1": { + "id": "1", + "submitdate": "2023-03-16 23:33:17", + "lastpage": "8", + "startlanguage": "en", + "seed": "1722147725", + "startdate": "2023-03-16 23:30:16", + "datestamp": "2023-03-16 23:33:17", + "ipaddr": "10.5.14.5", + "BaseCost": "225", + "Intro1": "", + "Promise1": "", + "Name1": "Lara", + "Name2": "Rose", + "Name3": "", + "Email[1]": "LaraRose@letu.edu", + "Email[2]": "LaraRose@letu.edu", + "Gender": "F", + "ICCM": "N", + "Shirt": "A1", + "Shirt[comment]": "", + "OrgName": "LETU", + "OrgWeb": "https:\/\/www.letu.edu", + "OrgType": "A3", + "OrgAddress[SQ001]": "2100 S Mobberly Ave", + "OrgAddress[SQ002]": "Longview", + "OrgAddress[SQ003]": "Texas", + "OrgAddress[SQ004]": "75602", + "OrgAddress[SQ005]": "United States", + "PreRegCutoffDate": "2022-12-01", + "EarlyBirdCutoffDate": "2023-04-15", + "Reg2": "A1", + "Reg6": "Y", + "NonAttendingNames1[SQ001]": "Dan Rose", + "NonAttendingNames1[SQ002]": null, + "NonAttendingNames1[SQ003]": null, + "NonAttendingNames1[SQ004]": null, + "NonAttendingNames1[SQ005]": null, + "NonAttendingNames1[SQ006]": null, + "Reg7": "N", + "NonAttendingNames2[SQ001]": null, + "NonAttendingNames2[SQ002]": null, + "NonAttendingNames2[SQ003]": null, + "NonAttendingNames2[SQ004]": null, + "NonAttendingNames2[SQ005]": null, + "NonAttendingNames2[SQ006]": null, + "Reg8": "A2", + "Travel3": "Dan", + "BYOL": "Y", + "Reg3": null, + "Reg4": null, + "Reg5": null, + "Travel1": "A4", + "Travel2": null, + "MissioNexus": "N", + "HousingCost": "50", + "SubTotal1": "375", + "SubTotal2": "150", + "SubTotal": "525", + "EarlyRegSelf": "93.75", + "EarlyRegNonAttending": "37.5", + "SubTotal3": "393.75", + "DiscountCode": "XOIF", + "Discount1": "0", + "TotalCost": "393.75", + "EndCost": "", + "Travel35": "Y", + "Travel4": "I'm special", + "Travel5[SQ001]": "Dan", + "Travel5[SQ002]": "607-768-5223", + "Travel5[SQ003]": "903-233-3210", + "Shape": null, + "Shape2": null, + "Shape3": null, + "Shape4": null, + "Shape5": null, + "Shape6": null, + "Shape7": null, + "Privacy1": "", + "PrivacyNameRadio": "A3", + "Privacy3[SQ005]": "", + "Privacy3[SQ001]": "Y", + "Privacy3[SQ002]": "Y", + "Privacy3[SQ003]": "Y", + "Privacy3[SQ004]": "Y", + "Privacy4": "Y", + "Final2": "A1", + "EndRegText": "" + } + }, + { + "2": { + "id": "2", + "submitdate": "2023-03-16 23:36:20", + "lastpage": "8", + "startlanguage": "en", + "seed": "110849489", + "startdate": "2023-03-16 23:31:02", + "datestamp": "2023-03-16 23:36:20", + "ipaddr": "10.5.14.0", + "BaseCost": "225", + "Intro1": "", + "Promise1": "", + "Name1": "Achua", + "Name2": "Myanmar", + "Name3": "Matrioshka Brain", + "Email[1]": "myemail@fakemail.com", + "Email[2]": "myemail@fakemail.com", + "Gender": "F", + "ICCM": "N", + "Shirt": "A6", + "Shirt[comment]": "", + "OrgName": "Universidad De Finland", + "OrgWeb": "Finald.net", + "OrgType": "A3", + "OrgAddress[SQ001]": "3100 Street Lane", + "OrgAddress[SQ002]": "CityTown", + "OrgAddress[SQ003]": "Oklahoma", + "OrgAddress[SQ004]": "543210", + "OrgAddress[SQ005]": "Turkey", + "PreRegCutoffDate": "2022-12-01", + "EarlyBirdCutoffDate": "2023-04-15", + "Reg2": "A1", + "Reg6": "N", + "NonAttendingNames1[SQ001]": null, + "NonAttendingNames1[SQ002]": null, + "NonAttendingNames1[SQ003]": null, + "NonAttendingNames1[SQ004]": null, + "NonAttendingNames1[SQ005]": null, + "NonAttendingNames1[SQ006]": null, + "Reg7": "N", + "NonAttendingNames2[SQ001]": null, + "NonAttendingNames2[SQ002]": null, + "NonAttendingNames2[SQ003]": null, + "NonAttendingNames2[SQ004]": null, + "NonAttendingNames2[SQ005]": null, + "NonAttendingNames2[SQ006]": null, + "Reg8": "A2", + "Travel3": "Phil, my pet penguin", + "BYOL": "N", + "Reg3": null, + "Reg4": null, + "Reg5": null, + "Travel1": "A4", + "Travel2": null, + "MissioNexus": "Y", + "HousingCost": "50", + "SubTotal1": "375", + "SubTotal2": "0", + "SubTotal": "375", + "EarlyRegSelf": "93.75", + "EarlyRegNonAttending": "", + "SubTotal3": "306.25", + "DiscountCode": "code.hakk", + "Discount1": "25", + "TotalCost": "281.25", + "EndCost": "", + "Travel35": "N", + "Travel4": null, + "Travel5[SQ001]": "Genghis Kahn", + "Travel5[SQ002]": "1-800-sword-org", + "Travel5[SQ003]": "1-870-conquer-world", + "Shape": null, + "Shape2": null, + "Shape3": null, + "Shape4": null, + "Shape5": null, + "Shape6": null, + "Shape7": null, + "Privacy1": "", + "PrivacyNameRadio": "A4", + "Privacy3[SQ005]": "", + "Privacy3[SQ001]": "Y", + "Privacy3[SQ002]": "Y", + "Privacy3[SQ003]": "Y", + "Privacy3[SQ004]": "Y", + "Privacy4": "N", + "Final2": "A1", + "EndRegText": "" + } + }, + { + "3": { + "id": "3", + "submitdate": "2023-03-16 23:45:08", + "lastpage": "8", + "startlanguage": "en", + "seed": "2064732826", + "startdate": "2023-03-16 23:31:22", + "datestamp": "2023-03-16 23:45:08", + "ipaddr": "10.5.13.157", + "BaseCost": "225", + "Intro1": "", + "Promise1": "", + "Name1": "Nathan", + "Name2": "Moyes", + "Name3": "", + "Email[1]": "nathanmoyes@letu.edu", + "Email[2]": "nathanmoyes@letu.edu", + "Gender": "M", + "ICCM": "N", + "Shirt": "A7", + "Shirt[comment]": "Shirts are for the weak.", + "OrgName": "LeTourneau University, **THE** Christian Polytechnic University", + "OrgWeb": "https:\/\/github.com\/Natmoy-LETU\/kardia_LimeSurvey\/tree\/master\/kardia-app\/modules\/ex_limesurvey", + "OrgType": "A6", + "OrgAddress[SQ001]": "10 Downing Street", + "OrgAddress[SQ002]": "London", + "OrgAddress[SQ003]": "", + "OrgAddress[SQ004]": "", + "OrgAddress[SQ005]": "United Kingdom", + "PreRegCutoffDate": "2022-12-01", + "EarlyBirdCutoffDate": "2023-04-15", + "Reg2": "A2", + "Reg6": "N", + "NonAttendingNames1[SQ001]": null, + "NonAttendingNames1[SQ002]": null, + "NonAttendingNames1[SQ003]": null, + "NonAttendingNames1[SQ004]": null, + "NonAttendingNames1[SQ005]": null, + "NonAttendingNames1[SQ006]": null, + "Reg7": "N", + "NonAttendingNames2[SQ001]": null, + "NonAttendingNames2[SQ002]": null, + "NonAttendingNames2[SQ003]": null, + "NonAttendingNames2[SQ004]": null, + "NonAttendingNames2[SQ005]": null, + "NonAttendingNames2[SQ006]": null, + "Reg8": "A2", + "Travel3": "Xi Jinping", + "BYOL": "Y", + "Reg3": "A2", + "Reg4": "A5", + "Reg5": "A2", + "Travel1": "A2", + "Travel2": "Jetpack", + "MissioNexus": "Y", + "HousingCost": "50", + "SubTotal1": "520", + "SubTotal2": "0", + "SubTotal": "520", + "EarlyRegSelf": "130", + "EarlyRegNonAttending": "", + "SubTotal3": "390", + "DiscountCode": "Not Applicable", + "Discount1": "25", + "TotalCost": "365", + "EndCost": "", + "Travel35": "Y", + "Travel4": "None. Just Testing.", + "Travel5[SQ001]": "Joe Biden", + "Travel5[SQ002]": "202-456-1111", + "Travel5[SQ003]": "202-456-6213", + "Shape": null, + "Shape2": null, + "Shape3": null, + "Shape4": null, + "Shape5": null, + "Shape6": null, + "Shape7": null, + "Privacy1": "", + "PrivacyNameRadio": "A4", + "Privacy3[SQ005]": "Y", + "Privacy3[SQ001]": null, + "Privacy3[SQ002]": null, + "Privacy3[SQ003]": null, + "Privacy3[SQ004]": null, + "Privacy4": "N", + "Final2": "A1", + "EndRegText": "" + } + }, + { + "4": { + "id": "4", + "submitdate": "2023-03-16 23:41:51", + "lastpage": "8", + "startlanguage": "en", + "seed": "274544989", + "startdate": "2023-03-16 23:31:49", + "datestamp": "2023-03-16 23:41:51", + "ipaddr": "10.5.14.6", + "BaseCost": "225", + "Intro1": "", + "Promise1": "", + "Name1": "Randall", + "Name2": "Rinehart", + "Name3": "Randy", + "Email[1]": "randallrinehart@letu.edu", + "Email[2]": "randallrinehart@letu.edu", + "Gender": "M", + "ICCM": "N", + "Shirt": "A3", + "Shirt[comment]": "First Comment", + "OrgName": "LeTourneau University", + "OrgWeb": "letu.edu", + "OrgType": "A3", + "OrgAddress[SQ001]": "250 Oakridge Lane", + "OrgAddress[SQ002]": "Longview", + "OrgAddress[SQ003]": "Texas", + "OrgAddress[SQ004]": "75605", + "OrgAddress[SQ005]": "United States", + "PreRegCutoffDate": "2022-12-01", + "EarlyBirdCutoffDate": "2023-04-15", + "Reg2": "A1", + "Reg6": "N", + "NonAttendingNames1[SQ001]": null, + "NonAttendingNames1[SQ002]": null, + "NonAttendingNames1[SQ003]": null, + "NonAttendingNames1[SQ004]": null, + "NonAttendingNames1[SQ005]": null, + "NonAttendingNames1[SQ006]": null, + "Reg7": "N", + "NonAttendingNames2[SQ001]": null, + "NonAttendingNames2[SQ002]": null, + "NonAttendingNames2[SQ003]": null, + "NonAttendingNames2[SQ004]": null, + "NonAttendingNames2[SQ005]": null, + "NonAttendingNames2[SQ006]": null, + "Reg8": "A2", + "Travel3": "James Salazar", + "BYOL": "Y", + "Reg3": null, + "Reg4": null, + "Reg5": null, + "Travel1": "A4", + "Travel2": null, + "MissioNexus": "N", + "HousingCost": "50", + "SubTotal1": "375", + "SubTotal2": "0", + "SubTotal": "375", + "EarlyRegSelf": "93.75", + "EarlyRegNonAttending": "", + "SubTotal3": "281.25", + "DiscountCode": "", + "Discount1": "0", + "TotalCost": "281.25", + "EndCost": "", + "Travel35": "N", + "Travel4": null, + "Travel5[SQ001]": "Jaime Rinehart", + "Travel5[SQ002]": "9038062536", + "Travel5[SQ003]": "9038062536", + "Shape": null, + "Shape2": null, + "Shape3": null, + "Shape4": null, + "Shape5": null, + "Shape6": null, + "Shape7": null, + "Privacy1": "", + "PrivacyNameRadio": "A1", + "Privacy3[SQ005]": "", + "Privacy3[SQ001]": "Y", + "Privacy3[SQ002]": "Y", + "Privacy3[SQ003]": "Y", + "Privacy3[SQ004]": "Y", + "Privacy4": "Y", + "Final2": "A1", + "EndRegText": "" + } + }, + { + "5": { + "id": "5", + "submitdate": "2023-03-16 23:43:32", + "lastpage": "8", + "startlanguage": "en", + "seed": "1330257394", + "startdate": "2023-03-16 23:33:42", + "datestamp": "2023-03-16 23:43:32", + "ipaddr": "10.5.14.7", + "BaseCost": "225", + "Intro1": "", + "Promise1": "", + "Name1": "james", + "Name2": "salazar", + "Name3": "jamlsal", + "Email[1]": "jamessalazar@letu.edu", + "Email[2]": "jamessalazar@letu.edu", + "Gender": "M", + "ICCM": "N", + "Shirt": "A3", + "Shirt[comment]": "make it transparent", + "OrgName": "ham", + "OrgWeb": "google.c0m", + "OrgType": "A5", + "OrgAddress[SQ001]": "2100 S. Mobberly Ave", + "OrgAddress[SQ002]": "Longview", + "OrgAddress[SQ003]": "TX", + "OrgAddress[SQ004]": "75602", + "OrgAddress[SQ005]": "USA", + "PreRegCutoffDate": "2022-12-01", + "EarlyBirdCutoffDate": "2023-04-15", + "Reg2": "A1", + "Reg6": "N", + "NonAttendingNames1[SQ001]": null, + "NonAttendingNames1[SQ002]": null, + "NonAttendingNames1[SQ003]": null, + "NonAttendingNames1[SQ004]": null, + "NonAttendingNames1[SQ005]": null, + "NonAttendingNames1[SQ006]": null, + "Reg7": "N", + "NonAttendingNames2[SQ001]": null, + "NonAttendingNames2[SQ002]": null, + "NonAttendingNames2[SQ003]": null, + "NonAttendingNames2[SQ004]": null, + "NonAttendingNames2[SQ005]": null, + "NonAttendingNames2[SQ006]": null, + "Reg8": "A2", + "Travel3": "kjhhjlhl", + "BYOL": "N", + "Reg3": null, + "Reg4": null, + "Reg5": null, + "Travel1": "A4", + "Travel2": null, + "MissioNexus": "Y", + "HousingCost": "50", + "SubTotal1": "375", + "SubTotal2": "0", + "SubTotal": "375", + "EarlyRegSelf": "93.75", + "EarlyRegNonAttending": "", + "SubTotal3": "306.25", + "DiscountCode": "", + "Discount1": "25", + "TotalCost": "281.25", + "EndCost": "", + "Travel35": "Y", + "Travel4": "lkjjklj;klj;l", + "Travel5[SQ001]": "jlkjlkkljl", + "Travel5[SQ002]": "9009009999", + "Travel5[SQ003]": "9009009999", + "Shape": null, + "Shape2": null, + "Shape3": null, + "Shape4": null, + "Shape5": null, + "Shape6": null, + "Shape7": null, + "Privacy1": "", + "PrivacyNameRadio": "A3", + "Privacy3[SQ005]": "", + "Privacy3[SQ001]": "Y", + "Privacy3[SQ002]": "Y", + "Privacy3[SQ003]": "Y", + "Privacy3[SQ004]": "Y", + "Privacy4": "Y", + "Final2": "A1", + "EndRegText": "" + } + } + ] +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/gregconnect.qy b/kardia-app/modules/ex_limesurvey/gregconnect.qy index e0bd3598..179f648b 100644 --- a/kardia-app/modules/ex_limesurvey/gregconnect.qy +++ b/kardia-app/modules/ex_limesurvey/gregconnect.qy @@ -15,12 +15,13 @@ activity "system/query" ; select + name = 'response.json', content_type = 'application/json', inner_type = 'application/json', - objcontent = convert(string,from_base64(:result)), - name = 'file.json' + objcontent = convert(string,from_base64(:result)) from object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY) "; + name_expression = "'response.json'"; } diff --git a/kardia-app/modules/ex_limesurvey/import_insert.qy b/kardia-app/modules/ex_limesurvey/import_insert.qy index 280b1345..b0648b76 100644 --- a/kardia-app/modules/ex_limesurvey/import_insert.qy +++ b/kardia-app/modules/ex_limesurvey/import_insert.qy @@ -12,9 +12,9 @@ myquery "system/query" i_crm_phone = eval(\":j:'\" + :cit:i_crm_field_phone + \"'\", \"O\"), i_crm_import_status = 'Y', - i_crm_create_partner = 0, - i_crm_create_email = 0, - i_crm_create_phone = 0, + i_crm_create_partner = 1, + i_crm_create_email = 1, + i_crm_create_phone = 1, s_date_created = getdate(), s_created_by = 'Dummy User', diff --git a/kardia-app/modules/ex_limesurvey/james_import_insert.qy b/kardia-app/modules/ex_limesurvey/james_import_insert.qy index 113abe75..63f7b3ab 100644 --- a/kardia-app/modules/ex_limesurvey/james_import_insert.qy +++ b/kardia-app/modules/ex_limesurvey/james_import_insert.qy @@ -1,7 +1,9 @@ $Version=2$ myquery "system/query" - { +{ + SURVEY_ID "query/parameter" { type=integer; } sql = " + INSERT INTO /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows SELECT @@ -38,10 +40,12 @@ myquery "system/query" )))) FROM IDENTITY - WILDCARD /apps/kardia/modules/ex_limesurvey/connect.qy/* j + WILDCARD expression('/apps/kardia/modules/ex_limesurvey/connect.qy?SURVEY_ID='+:parameters:SURVEY_ID+'/response.json/responses/*') j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit WHERE - :cit:i_crm_import_type_id = 422914 + :cit:i_crm_import_type_id = :parameters:SURVEY_ID + AND + :j:submitdate IS NOT NULL "; -} \ No newline at end of file +} diff --git a/kardia-app/modules/ex_limesurvey/james_test.qy b/kardia-app/modules/ex_limesurvey/james_test.qy new file mode 100644 index 00000000..cbf06d5d --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/james_test.qy @@ -0,0 +1,21 @@ +$Version=2$ +myquery "system/query" +{ + SURVEY_ID "query/parameter" { type=integer; } + sql = " + + INSERT INTO + /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows + SELECT + * + FROM + IDENTITY + WILDCARD expression('/apps/kardia/modules/ex_limesurvey/connect.qy?SURVEY_ID='+:parameters:SURVEY_ID+'/response.json/responses/*') j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = :parameters:SURVEY_ID + AND + :j:submitdate IS NOT NULL + "; +} diff --git a/kardia-app/modules/ex_limesurvey/ldr_connect.qy b/kardia-app/modules/ex_limesurvey/ldr_connect.qy new file mode 100644 index 00000000..06ce2601 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/ldr_connect.qy @@ -0,0 +1,40 @@ +// File that manages the API connections with limesurvery + +$Version=2$ + +activity "system/query" +{ + + // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + + SURVEY_ID "query/parameter" { type=integer; } + sql = "declare object KEY; + + select + :KEY:API_KEY=:result + from + object /apps/kardia/modules/ex_limesurvey/get_key.http + ; + + select + name = 'response.json', + content_type = 'application/json', + inner_type = 'application/json', + objcontent = convert(string,from_base64(:result)) + + + from + IDENTITY + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY+'&SURVEY_ID='+:parameters:SURVEY_ID) j +-- WILDCARD expression('/apps/kardia/modules/ex_limesurvey/connect.qy?SURVEY_ID='+:parameters:SURVEY_ID+'/response.json/responses/*') j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = :parameters:SURVEY_ID + AND + :j:submitdate IS NOT NULL + + + "; + name_expression = "'response.json'"; +} diff --git a/kardia-app/modules/ex_limesurvey/option_import_insert.qy b/kardia-app/modules/ex_limesurvey/option_import_insert.qy new file mode 100644 index 00000000..781a7f24 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/option_import_insert.qy @@ -0,0 +1,38 @@ +$Version=2$ +myquery "system/query" +{ + SURVEY_ID "query/parameter" { type=integer; } + + sql = " + INSERT INTO + /apps/kardia/data/Kardia_DB/i_crm_partner_import_option/rows + SELECT + --i_crm_import_type_id = + --i_crm_import_type_option_id = + --primary key from i_crm_import_type_option table + + i_crm_tag_strength = convert(double, substring(eval(\":j:'\" + :cit:i_crm_option_field + \"'\", \"O\"), 2, 1)) / 4.0, + + i_crm_create_option = 1, + + s_date_created = getdate(), + s_created_by = user_name(), + s_date_modified = getdate(), + s_modified_by = user_name() + FROM + IDENTITY + WILDCARD expression('/apps/kardia/modules/ex_limesurvey/connect.qy?SURVEY_ID='+:parameters:SURVEY_ID+'/response.json/responses/*') j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type_option/rows cit + WHERE + :cit:i_crm_import_type_id = :parameters:SURVEY_ID + AND + :j:submitdate IS NOT NULL + HAVING + charindex( + ',' + eval(\":j:'\" + :cit:i_crm_option_field + \"'\", \"O\") + ',' + , + ',' + :cit:i_crm_option_value + ',' + ) > 0 + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/randall_import_insert.qy b/kardia-app/modules/ex_limesurvey/randall_import_insert.qy new file mode 100644 index 00000000..280b1345 --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/randall_import_insert.qy @@ -0,0 +1,65 @@ +$Version=2$ +myquery "system/query" +{ + SURVEY_ID "query/parameter" { type=integer; } + + sql = " + INSERT INTO + /apps/kardia/data/Kardia_DB/i_crm_partner_import/rows + SELECT + i_crm_email = eval(\":j:'\" + :cit:i_crm_field_email + \"'\", \"O\"), + i_crm_comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\"), + i_crm_phone = eval(\":j:'\" + :cit:i_crm_field_phone + \"'\", \"O\"), + + i_crm_import_status = 'Y', + i_crm_create_partner = 0, + i_crm_create_email = 0, + i_crm_create_phone = 0, + + s_date_created = getdate(), + s_created_by = 'Dummy User', + s_date_modified = getdate(), + s_modified_by = 'Dummy User', + + -- Everything from beginning to first space is considered first name (first word in string) + i_crm_given_name = condition( + charindex(' ', ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))) == 0, + rtrim(ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\"))), + rtrim(ltrim(substring( + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")), + 1, + charindex( + ' ', + ltrim(eval(\":j:'\" + :cit:i_crm_field_given_name + \"'\", \"O\")) + ) - 1 + ))) + ), + + -- Everything from the last space to the end is considered surname (final word in string) + i_crm_surname = condition( + charindex(' ', reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\")))) == 0, + ltrim(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\"))), + rtrim(ltrim(reverse(substring( + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\"))), + 1, + charindex( + ' ', + reverse(rtrim(eval(\":j:'\" + :cit:i_crm_field_surname + \"'\", \"O\"))) + ) - 1 + )))) + ), + + i_crm_address1 = eval(\":j:'\" + :cit:i_crm_field_addr1 + \"'\", \"O\"), + i_crm_address2 = eval(\":j:'\" + :cit:i_crm_field_addr2 + \"'\", \"O\"), + i_crm_address3 = eval(\":j:'\" + :cit:i_crm_field_addr3 + \"'\", \"O\") + FROM + IDENTITY + WILDCARD expression('/apps/kardia/modules/ex_limesurvey/connect.qy?SURVEY_ID='+:parameters:SURVEY_ID+'/response.json/responses/*') j + , + /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit + WHERE + :cit:i_crm_import_type_id = :parameters:SURVEY_ID + AND + :j:submitdate IS NOT NULL + "; +} \ No newline at end of file diff --git a/kardia-app/modules/ex_limesurvey/test_connect.qy b/kardia-app/modules/ex_limesurvey/test_connect.qy new file mode 100644 index 00000000..e6522dad --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/test_connect.qy @@ -0,0 +1,29 @@ +// File that manages the API connections with limesurvery + +$Version=2$ + +activity "system/query" +{ + + // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + + //SURVEY_ID "query/parameter" { type=integer; } + sql = "declare object KEY; + + select + :KEY:API_KEY=:result + from + object /apps/kardia/modules/ex_limesurvey/get_key.http + ; + + select + name = 'response.json', + content_type = 'application/json', + inner_type = 'application/json', + objcontent = convert(string,from_base64(:result)) + from + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY+'&SURVEY_ID=913697') + + "; + name_expression = "'response.json'"; +} diff --git a/kardia-app/modules/ex_limesurvey/test_connect.qy~ b/kardia-app/modules/ex_limesurvey/test_connect.qy~ new file mode 100644 index 00000000..537a298a --- /dev/null +++ b/kardia-app/modules/ex_limesurvey/test_connect.qy~ @@ -0,0 +1,29 @@ +// File that manages the API connections with limesurvery + +$Version=2$ + +activity "system/query" +{ + + // sql = "select :\"Set-Cookie\" from object /apps/kardia/modules/ex_limesurvey/get_key.http"; + + //SURVEY_ID "query/parameter" { type=integer; } + sql = "declare object KEY; + + select + :KEY:API_KEY=:result + from + object /apps/kardia/modules/ex_limesurvey/get_key.http + ; + + select + name = 'response.json', + content_type = 'application/json', + inner_type = 'application/json', + objcontent = convert(string,from_base64(:result)) + from + object expression('/apps/kardia/modules/ex_limesurvey/get_survey_responses.http?KEY='+:KEY:API_KEY+'&SURVEY_ID=422914) + + "; + name_expression = "'response.json'"; +} diff --git a/kardia-app/modules/ex_limesurvey/rsr_select_comment.qy b/kardia-app/modules/ex_limesurvey/test_hardcode_survey_id.qy similarity index 53% rename from kardia-app/modules/ex_limesurvey/rsr_select_comment.qy rename to kardia-app/modules/ex_limesurvey/test_hardcode_survey_id.qy index 6b35fbaf..cef6060f 100644 --- a/kardia-app/modules/ex_limesurvey/rsr_select_comment.qy +++ b/kardia-app/modules/ex_limesurvey/test_hardcode_survey_id.qy @@ -3,13 +3,13 @@ myquery "system/query" { sql = " SELECT - comment = eval(\":j:'\" + :cit:i_crm_field_comment + \"'\", \"O\") + i_crm_email = :j:'A01[SQ005]' FROM IDENTITY - WILDCARD ./testjson.json/responses/* j + WILDCARD ./connect.qy?SURVEY_ID=422914/response.json/responses/* j , /apps/kardia/data/Kardia_DB/i_crm_import_type/rows cit WHERE - :cit:i_crm_import_type_id = 1 + :cit:i_crm_import_type_id = 422914 "; } \ No newline at end of file