Skip to content

Commit

Permalink
Resolved databasehelper versions. Removed duplicate disease initializ…
Browse files Browse the repository at this point in the history
…ation and duplicate region and district heading.
  • Loading branch information
Flava177 committed Nov 12, 2024
1 parent ea58c2e commit 2391d6b
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3878,34 +3878,6 @@ public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultImmuno VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultImmunoDate DATE;");

case 372:
currentVersion = 372;
getDao(EpiData.class).executeRaw("ALTER TABLE samples ADD COLUMN hasSampleBeenCollected varchar(255) ;");

case 373:
currentVersion = 373;
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN nationality varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN ethnicity varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN headHouseHold varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN nameHealthFacility varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN service varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN qualification varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN professionOfPatientOther varchar(255) ;");
getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN professionOfPatientString varchar(255) ;");

case 374:
currentVersion = 374;
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampletestsstring VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultPCR VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultPCRDate DATE;");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultAntigen VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultAntigenDate DATE;");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultIGM VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultIGMDate DATE;");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultIGG VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultIGGDate DATE;");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultImmuno VARCHAR(255);");
getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogentest ADD COLUMN sampleTestResultImmunoDate DATE;");

// ATTENTION: break should only be done after last version
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ record = getEpiDataOfCaseOrContact(getActivityRootData());
initialDistrictsList = InfrastructureDaoHelper.loadDistricts(record.getHistoryOfTravelRegion());
initialCommunitiesList = InfrastructureDaoHelper.loadCommunities(record.getHistoryOfTravelDistrict());
listDrinkingWaterSources = DataUtils.getEnumItems(DrinkingWaterSource.class, true);
disease = getDisease(getActivityRootData());
outcomeList = DataUtils.getEnumItems(CaseOutcome.class, true);
}

Expand Down Expand Up @@ -522,7 +521,7 @@ public void onAfterLayoutBinding(FragmentEditEpidLayoutBinding contentBinding) {
}
}

if (disease == Disease.AHF){
if (caseDisease == Disease.AHF){
handleAHF();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,6 @@
style="@style/SubHeadingStyle" />

<LinearLayout
android:id="@+id/caseData_responsibleRegion_heading"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
Expand Down

0 comments on commit 2391d6b

Please sign in to comment.