Skip to content
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

Issue#6433 #6662

Merged
merged 20 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ce589a0
Signed-off-by: buddhika75 <buddhika.ari@gmail.com>
buddhika75 Jul 27, 2024
81d0d77
Merge branch 'master' of http://github.com/hmislk/hmis.git into Issue…
buddhika75 Jul 27, 2024
102612f
Merge branch 'Issue#6603' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
8deffe0
Merge branch 'Issue#6653' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
2a831f5
Merge branch 'Issue#6649' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
addc5e6
Merge branch 'Issue#6638' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
8d6518a
Merge branch 'Issue#6624' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
cd5ed01
Merge branch 'Issue#6413' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
ab02afe
Merge branch 'Issue#6198' of http://github.com/hmislk/hmis.git into I…
buddhika75 Jul 27, 2024
1f1debc
Signed-off-by: buddhika75 <buddhika.ari@gmail.com>
buddhika75 Jul 28, 2024
c7af10b
Merge branch 'Issue#4343' of https://github.com/hmislk/hmis.git into …
DamithDeshan Jul 28, 2024
0a40d84
Merge branch 'Issue#6198' of https://github.com/hmislk/hmis.git into …
DamithDeshan Jul 28, 2024
28bda20
Merge branch 'Issue#6612' of https://github.com/hmislk/hmis.git into …
DamithDeshan Jul 28, 2024
52149ae
Merge branch 'Issue#249' of https://github.com/hmislk/hmis.git into I…
DamithDeshan Jul 28, 2024
2085a86
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Jul 28, 2024
3bea92f
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Jul 28, 2024
0410c31
Signed-off-by: DamithDeshan <hkddrajapaksha@gmail.com>
DamithDeshan Jul 28, 2024
7791497
closes#6433
DamithDeshan Jul 28, 2024
381eadc
Merge branch 'master' into Issue#6433
DamithDeshan Jul 28, 2024
1198ba6
Merge branch 'master' into Issue#6433
DARKDRAGON-LK Jul 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/counter.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11
11
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.divudi</groupId>
<artifactId>sethmademo1</artifactId>
<artifactId>ruhunu-demo</artifactId>
<version>3.0.0</version>
<packaging>war</packaging>
<name>sethmademo1</name>
<name>ruhunu-demo</name>

<properties>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
Expand Down
254 changes: 201 additions & 53 deletions src/main/java/com/divudi/bean/common/OpdPreSettleController.java

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/main/java/com/divudi/bean/common/SessionController.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,8 @@ public class SessionController implements Serializable, HttpSessionListener {

private static final long serialVersionUID = 1L;
WebUser loggedUser = null;
@Deprecated
private UserPreference loggedPreference;
private UserPreference applicationPreference;
@Deprecated
private UserPreference institutionPreference;
private UserPreference departmentPreference;
private UserPreference userPreference;
Expand Down Expand Up @@ -1906,7 +1904,7 @@ public UserPreference getLoggedPreference() {
return loggedPreference;
}

@Deprecated

public void setLoggedPreference(UserPreference loggedPreference) {
this.loggedPreference = loggedPreference;
}
Expand Down Expand Up @@ -2069,10 +2067,12 @@ public void setWebsiteUserGoingToLog(boolean websiteUserGoingToLog) {
}

public UserPreference getDepartmentPreference() {
//System.out.println("getting departmentPreference = " + departmentPreference);
return departmentPreference;
}

public void setDepartmentPreference(UserPreference departmentPreference) {
System.out.println("setting departmentPreference = " + departmentPreference);
this.departmentPreference = departmentPreference;
}

Expand Down
19 changes: 19 additions & 0 deletions src/main/java/com/divudi/bean/lab/PatientSampleController.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,25 @@ public PatientSample getCurrent() {
return current;
}

public String navigateToViewPatientSample(PatientSample ps) {
if (ps == null) {
JsfUtil.addErrorMessage("Nothing selected");
return null;
}
current = ps;
return "/lab/patient_sample?faces-redirect=true;";

}

public String navigateToEditPatientSample(PatientSample ps) {
if (ps == null) {
JsfUtil.addErrorMessage("Nothing selected");
return null;
}
current = ps;
return "/lab/patient_sample_edit?faces-redirect=true;";
}

public PatientSample getAnyPatientSample() {
return getItems().get(0);
}
Expand Down
43 changes: 43 additions & 0 deletions src/main/java/com/divudi/entity/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ public class Person implements Serializable {
@Transient
String ageAsString;
@Transient
private String ageAsShortString;
@Transient
long ageInDays;
@Transient
int serealNumber;
Expand Down Expand Up @@ -215,6 +217,39 @@ public void calAgeFromDob() {
ageYearsComponent = years;
}

public void calShortAgeFromDob() {
ageAsShortString = "";
ageInDays = 0L;
if (getDob() == null) {
return;
}

LocalDate ldDob = new LocalDate(getDob());
LocalDate currentDate = LocalDate.now();

Period period = new Period(ldDob, currentDate, PeriodType.yearMonthDay());

int years = period.getYears();
int months = period.getMonths();
int days = period.getDays();

if (years > 5) {
ageAsString = years + "Y";
} else if (years > 0) {
ageAsString = years + "Y" + months + "M";
} else if (months > 0) {
ageAsString = months + "M" + days + "d";
} else {
ageAsString = days + "d";
}

period = new Period(ldDob, currentDate, PeriodType.days());
ageInDays = (long) period.getDays();
ageDaysComponent = days;
ageMonthsComponent = months;
ageYearsComponent = years;
}

public void calDobFromAge() {
LocalDate currentDate = new LocalDate();
LocalDate ldDob = currentDate.minusYears(ageYearsComponent).minusMonths(ageMonthsComponent).minusDays(ageDaysComponent);
Expand Down Expand Up @@ -652,4 +687,12 @@ public void setSmsNumber(String smsNumber) {
this.smsNumber = smsNumber;
}

public String getAgeAsShortString() {
calShortAgeFromDob();
if (ageAsShortString == null || ageAsShortString.trim().equals("")) {
ageAsShortString = "";
}
return ageAsShortString;
}

}
44 changes: 44 additions & 0 deletions src/main/java/com/divudi/entity/lab/PatientSample.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ public class PatientSample implements Serializable {
private Department receivedFromAnalyzerDepartment;
@ManyToOne
private Institution receivedFromAnalyzerInstitution;
@ManyToOne
private PatientSample duplicatedFrom;
@ManyToOne
private PatientSample duplicatedTo;
@ManyToOne
private PatientSample divertedFrom;
@ManyToOne
private PatientSample divertedTo;

//
@ManyToOne
Expand All @@ -97,6 +105,10 @@ public class PatientSample implements Serializable {
private Machine machine;
@ManyToOne
private Sample sample;




//Cancellation
private Boolean cancelled = false;
@ManyToOne
Expand Down Expand Up @@ -484,6 +496,38 @@ public void setRetireComments(String retireComments) {
this.retireComments = retireComments;
}

public PatientSample getDuplicatedFrom() {
return duplicatedFrom;
}

public void setDuplicatedFrom(PatientSample duplicatedFrom) {
this.duplicatedFrom = duplicatedFrom;
}

public PatientSample getDuplicatedTo() {
return duplicatedTo;
}

public void setDuplicatedTo(PatientSample duplicatedTo) {
this.duplicatedTo = duplicatedTo;
}

public PatientSample getDivertedFrom() {
return divertedFrom;
}

public void setDivertedFrom(PatientSample divertedFrom) {
this.divertedFrom = divertedFrom;
}

public PatientSample getDivertedTo() {
return divertedTo;
}

public void setDivertedTo(PatientSample divertedTo) {
this.divertedTo = divertedTo;
}



}
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">
<jta-data-source>jdbc/sethma</jta-data-source>
<jta-data-source>jdbc/arogya</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
Expand All @@ -10,7 +10,7 @@
</properties>
</persistence-unit>
<persistence-unit name="hmisAuditPU" transaction-type="JTA">
<jta-data-source>jdbc/sethmaaudit</jta-data-source>
<jta-data-source>jdbc/arogyaAudit</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="eclipselink.logging.level.sql" value="SEVERE"/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0.20240728.11
3.0.0.20240728.11
Loading