-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kenyaemr migration changes #4
base: master
Are you sure you want to change the base?
Kenyaemr migration changes #4
Conversation
…und in the system
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
public class HTSGroupedObservations implements DatasetGroupedObservations { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the meaning of HTSGroupedObservations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkayiwa I am trying to process grouped observations in an Hiv Testing Services' dataset. I am thinking of putting all these in an excel/csv template for ease of editing.
@@ -340,12 +360,13 @@ public static File importTemplate(SpreadsheetImportTemplate template, MultipartF | |||
Exception exception = null; | |||
try { | |||
DatabaseBackend.validateData(rowData); | |||
String encounterId = DatabaseBackend.importData(rowData, rollbackTransaction); | |||
/*String encounterId = DatabaseBackend.importData(rowData, rowEncDate, rollbackTransaction); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intentionally comment this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove this. I added Encounter Date in the provided dataset and should apply to an entire row.
} catch (SpreadsheetImportTemplateValidationException e) { | ||
messages.add("Validation failed: " + e.getMessage()); | ||
return null; | ||
} catch (SpreadsheetImportDuplicateValueException e) { | ||
} /*catch (SpreadsheetImportDuplicateValueException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intentionally comment this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will remove this
} | ||
} | ||
|
||
/* for (SpreadsheetImportTemplatePrespecifiedValue s : template.getPrespecifiedValues()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I added a new controller to handle DB based datasets, I will restore this class to its original content and have all changes in the new class.
@@ -146,7 +151,7 @@ public String processSubmit(@ModelAttribute("template") SpreadsheetImportTemplat | |||
else if ("CWE".equals(hl7Abbrev)) | |||
column.setTableDotColumn("obs.value_coded"); | |||
else if ("BIT".equals(hl7Abbrev)) | |||
column.setTableDotColumn("obs.value_boolean"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we drop support for older versions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will restore this
template.clearPrespecifiedValues(); | ||
template.clearColumnColumns(); | ||
SpreadsheetImportUtil.resolveTemplateDependencies(template); | ||
//template.clearPrespecifiedValues(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intentionally comment this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line clears values of obs, person attributes, and identifiers on the edit form. Sometimes one simply wants access to what was previous configurations.
//template = Context.getService(SpreadsheetImportService.class).getTemplateById(tableToTemplateMap.get("demographics")); | ||
//successfulProcessMsg = DbImportUtil.importTemplate(template, file, sheet, messages, rollbackTransaction); | ||
|
||
/*if (successfulProcessMsg != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the newly commented out code, can we just drop it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree
@@ -118,16 +208,7 @@ public String processSubmit(@ModelAttribute("template") SpreadsheetImportTemplat | |||
messageString += messages.get(i); | |||
} | |||
if (succeeded) { | |||
messageString += "Success!"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intentionally remove all this block?
@@ -146,6 +146,8 @@ UNLOCK TABLES; | |||
DROP TABLE IF EXISTS `spreadsheetimport_template_prespecified_value`; | |||
/*!40101 SET @saved_cs_client = @@character_set_client */; | |||
/*!40101 SET character_set_client = utf8 */; | |||
# noinspection SqlNoDataSourceInspection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will investigate this. It seems to be an automatically added line by my editor.
<td><formsim:select path="prespecifiedValues[${status.index}].value"> | ||
|
||
|
||
|
||
<formsim:option value="" label="${prespecifiedValues[status.index].value}"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What could be the reason behind changing the label and value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This blanks all values even on the view/edit mode.
Kenyaemr migration changes
Contact listing processor
Process repeating sections 2
resolve failing vl/cd4 imports due to orphaned rows
complete processing of registration data
…tribute Escape apostrophe in person attribute
Close all migrated visits
No description provided.