Skip to content

Commit

Permalink
Fix Alvo -> Bowel (#1472)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwithi authored Jan 15, 2025
1 parent 673cab1 commit 0756bae
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 34 deletions.
30 changes: 15 additions & 15 deletions sql/load_demo_data.sql

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sql/step_04_all_following_steps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ source step_a112_users_and_groups_soft_deletion.sql;
source step_a113_alter_table_medicalinventory.sql;
source step_a114_medical_type_soft_deletion.sql;
source step_a115_add_missing_foreign_key_for_auditable_entities.sql;
source step_a116_fix_alcohol_column.sql;
source step_a116_fix_alcohol_and_bowel_column.sql;
6 changes: 6 additions & 0 deletions sql/step_a116_fix_alcohol_and_bowel_column.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE OH_PATIENTHISTORY
CHANGE COLUMN `PAH_PHY_ALCOOL` `PAH_PHY_ALCOHOL` TINYINT(1) NULL DEFAULT 0 ;

ALTER TABLE OH_PATIENTHISTORY
CHANGE COLUMN `PAH_PHY_ALVO_NOR` `PAH_PHY_BOWEL_NOR` TINYINT(1) NULL DEFAULT 1 ,
CHANGE COLUMN `PAH_PHY_ALVO_ABN` `PAH_PHY_BOWEL_ABN` VARCHAR(30) NULL DEFAULT NULL ;
2 changes: 0 additions & 2 deletions sql/step_a116_fix_alcohol_column.sql

This file was deleted.

24 changes: 12 additions & 12 deletions src/main/java/org/isf/anamnesis/model/PatientHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ public class PatientHistory extends Auditable<String> implements Comparable<Pati
@Column(name = "PAH_PHY_NUTR_ABN")
private String phyNutritionAbnormal;

@Column(name = "PAH_PHY_ALVO_NOR")
@Column(name = "PAH_PHY_BOWEL_NOR")
@ColumnDefault("true")
private boolean phyAlvoNormal = true;
private boolean phyBowelNormal = true;

@Column(name = "PAH_PHY_ALVO_ABN")
private String phyAlvoAbnormal;
@Column(name = "PAH_PHY_BOWEL_ABN")
private String phyBowelAbnormal;

@Column(name = "PAH_PHY_DIURE_NOR")
@ColumnDefault("true")
Expand Down Expand Up @@ -553,20 +553,20 @@ public void setPhyNutritionAbnormal(String phyNutritionAbnormal) {
this.phyNutritionAbnormal = phyNutritionAbnormal;
}

public boolean isPhyAlvoNormal() {
return phyAlvoNormal;
public boolean isPhyBowelNormal() {
return phyBowelNormal;
}

public void setPhyAlvoNormal(boolean phyAlvoNormal) {
this.phyAlvoNormal = phyAlvoNormal;
public void setPhyBowelNormal(boolean phyBowelNormal) {
this.phyBowelNormal = phyBowelNormal;
}

public String getPhyAlvoAbnormal() {
return phyAlvoAbnormal;
public String getPhyBowelAbnormal() {
return phyBowelAbnormal;
}

public void setPhyAlvoAbnormal(String phyAlvoAbnormal) {
this.phyAlvoAbnormal = phyAlvoAbnormal;
public void setPhyBowelAbnormal(String phyBowelAbnormal) {
this.phyBowelAbnormal = phyBowelAbnormal;
}

public boolean isPhyDiuresisNormal() {
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/isf/anamnesis/TestPatientHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public PatientHistory setup() throws Exception {
patientHistory.setPatNote("Patient Note");
patientHistory.setPhyNutritionNormal(true);
patientHistory.setPhyNutritionAbnormal("Nutrition Abnormal");
patientHistory.setPhyAlvoNormal(false);
patientHistory.setPhyAlvoAbnormal("Alvo Abnormal");
patientHistory.setPhyBowelNormal(false);
patientHistory.setPhyBowelAbnormal("Bowel Abnormal");
patientHistory.setPhyDiuresisNormal(true);
patientHistory.setPhyDiuresisAbnormal("Diuresis Abnormal");
patientHistory.setPhyAlcohol(false);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/isf/anamnesis/Tests.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ void testPatientHistoryGets() throws Exception {
assertThat(patientHistory.getPatNote()).isEqualTo("Patient Note");
assertThat(patientHistory.isPhyNutritionNormal()).isTrue();
assertThat(patientHistory.getPhyNutritionAbnormal()).isEqualTo("Nutrition Abnormal");
assertThat(patientHistory.isPhyAlvoNormal()).isFalse();
assertThat(patientHistory.getPhyAlvoAbnormal()).isEqualTo("Alvo Abnormal");
assertThat(patientHistory.isPhyBowelNormal()).isFalse();
assertThat(patientHistory.getPhyBowelAbnormal()).isEqualTo("Bowel Abnormal");
assertThat(patientHistory.isPhyDiuresisNormal()).isTrue();
assertThat(patientHistory.getPhyDiuresisAbnormal()).isEqualTo("Diuresis Abnormal");
assertThat(patientHistory.isPhyAlcohol()).isFalse();
Expand Down

0 comments on commit 0756bae

Please sign in to comment.