Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/maven/io.github.openfeign-feig…
Browse files Browse the repository at this point in the history
…n-gson-13.0
  • Loading branch information
dbmalkovsky authored Nov 6, 2023
2 parents 4d1c9c0 + 500446b commit 2ee8069
Show file tree
Hide file tree
Showing 24 changed files with 551 additions and 475 deletions.
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,12 @@
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>4.0.3</version>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>4.0.3</version>
<version>4.0.4</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
Expand All @@ -289,22 +289,22 @@
<dependency>
<groupId>org.dcm4che</groupId>
<artifactId>dcm4che-core</artifactId>
<version>5.31.0</version>
<version>5.31.1</version>
</dependency>
<dependency>
<groupId>org.dcm4che</groupId>
<artifactId>dcm4che-image</artifactId>
<version>5.31.0</version>
<version>5.31.1</version>
</dependency>
<dependency>
<groupId>org.dcm4che</groupId>
<artifactId>dcm4che-imageio</artifactId>
<version>5.31.0</version>
<version>5.31.1</version>
</dependency>
<dependency>
<groupId>org.dcm4che</groupId>
<artifactId>dcm4che-imageio-opencv</artifactId>
<version>5.31.0</version>
<version>5.31.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/org/isf/examination/model/Ausculation.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Open Hospital (www.open-hospital.org)
* Copyright © 2006-2023 Informatici Senza Frontiere ([email protected])
*
* Open Hospital is a free and open source software for healthcare data management.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.isf.examination.model;

public enum Ausculation {
normal, wheezes, rhonchi, crackles, stridor, bronchial
}
26 changes: 26 additions & 0 deletions src/main/java/org/isf/examination/model/Bowel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Open Hospital (www.open-hospital.org)
* Copyright © 2006-2023 Informatici Senza Frontiere ([email protected])
*
* Open Hospital is a free and open source software for healthcare data management.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.isf.examination.model;

public enum Bowel {
constipation, regular, diarrheal, irregular
}
26 changes: 26 additions & 0 deletions src/main/java/org/isf/examination/model/Diurese.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Open Hospital (www.open-hospital.org)
* Copyright © 2006-2023 Informatici Senza Frontiere ([email protected])
*
* Open Hospital is a free and open source software for healthcare data management.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* https://www.gnu.org/licenses/gpl-3.0-standalone.html
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.isf.examination.model;

public enum Diurese {
physiological, oliguria, anuria, frequent, nocturia, stranguria, hematuria, pyuria
}
14 changes: 8 additions & 6 deletions src/main/java/org/isf/generaldata/ExaminationParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ public final class ExaminationParameters extends ConfigurationProperties {
private static final String FILE_PROPERTIES = "examination.properties";

public static int HEIGHT_MIN;
private static int DEFAULT_HEIGHT_MIN;
private static int DEFAULT_HEIGHT_MIN = 0;

public static int HEIGHT_MAX;
private static final int DEFAULT_HEIGHT_MAX = 250;

public static int HEIGHT_INIT;
private static final int DEFAULT_HEIGHT_INIT = 170;
private static final int DEFAULT_HEIGHT_INIT = 0;

public static int WEIGHT_MIN;
private static final int DEFAULT_WEIGHT_MIN = 0;

public static int WEIGHT_MAX;
private static final int DEFAULT_WEIGHT_MAX = 400;
private static final int DEFAULT_WEIGHT_MAX = 200;

public static double WEIGHT_STEP;
private static final double DEFAULT_WEIGHT_STEP = 0.1;

public static int WEIGHT_INIT;
private static int DEFAULT_WEIGHT_INIT = 80;
private static int DEFAULT_WEIGHT_INIT = 0;

public static int AP_MIN_INIT;
private static final int DEFAULT_AP_MIN_INIT = 80;
Expand All @@ -73,7 +73,7 @@ public final class ExaminationParameters extends ConfigurationProperties {
private static final int DEFAULT_RR_MAX = 100;

public static int RR_INIT;
private static final int DEFAULT_RR_INIT = 15;
private static final int DEFAULT_RR_INIT = 20;

public static String AUSCULTATION_INIT = "normal";

Expand All @@ -82,7 +82,7 @@ public final class ExaminationParameters extends ConfigurationProperties {
public static String BOWEL_DESC_INIT = "regular";

public static int TEMP_MIN;
private static final int DEFAULT_TEMP_MIN = 0;
private static final int DEFAULT_TEMP_MIN = 30;

public static int TEMP_MAX;
private static final int DEFAULT_TEMP_MAX = 50;
Expand All @@ -95,6 +95,8 @@ public final class ExaminationParameters extends ConfigurationProperties {

public static int SAT_MIN;
private static final int DEFAULT_SAT_MIN = 50;

public static int SAT_MAX = 100;

public static int SAT_INIT;
private static final int DEFAULT_SAT_INIT = 90;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class OperationTypeBrowserManager {
/**
* Return the list of {@link OperationType}s
*
* @return the list of {@link OperationType}s. It could be <code>empty</code> or <code>null</code>.
* @return the list of {@link OperationType}s. It could be {@code empty} or {@code null}.
* @throws OHServiceException
*/
public List<OperationType> getOperationType() throws OHServiceException {
Expand All @@ -53,7 +53,7 @@ public List<OperationType> getOperationType() throws OHServiceException {
* Insert an {@link OperationType} in the DB
*
* @param operationType - the {@link OperationType} to insert
* @return <code>true</code> if the {@link OperationType} has been inserted, <code>false</code> otherwise.
* @return the newly inserted {@link OperationType} object.
* @throws OHServiceException
*/
public OperationType newOperationType(OperationType operationType) throws OHServiceException {
Expand All @@ -65,7 +65,7 @@ public OperationType newOperationType(OperationType operationType) throws OHServ
* Update an {@link OperationType}
*
* @param operationType - the {@link OperationType} to update
* @return <code>true</code> if the {@link OperationType} has been updated, <code>false</code> otherwise.
* @return the newly updated {@link OperationType} object.
* @throws OHServiceException
*/
public OperationType updateOperationType(OperationType operationType) throws OHServiceException {
Expand All @@ -74,21 +74,21 @@ public OperationType updateOperationType(OperationType operationType) throws OHS
}

/**
* Delete an {@link OperationType}
* Delete an {@link OperationType} object. If the object does not exist it is silently ignored. If the
* object is null a {@link OHServiceException} is thrown.
*
* @param operationType - the {@link OperationType} to delete
* @return <code>true</code> if the {@link OperationType} has been deleted, <code>false</code> otherwise.
* @throws OHServiceException
*/
public boolean deleteOperationType(OperationType operationType) throws OHServiceException {
return ioOperations.deleteOperationType(operationType);
public void deleteOperationType(OperationType operationType) throws OHServiceException {
ioOperations.deleteOperationType(operationType);
}

/**
* Checks if an {@link OperationType} code has already been used
*
* @param code - the code
* @return <code>true</code> if the code is already in use, <code>false</code> otherwise.
* @return {@code true} if the code is already in use, {@code false} otherwise.
* @throws OHServiceException
*/
public boolean isCodePresent(String code) throws OHServiceException {
Expand All @@ -106,10 +106,8 @@ protected void validateOperationType(OperationType operationType, boolean insert
errors.add(new OHExceptionMessage(MessageBundle.formatMessage("angal.common.thecodeistoolongmaxchars.fmt.msg", 2)));
}
}
if (insert) {
if (isCodePresent(key)) {
if (insert && isCodePresent(key)) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.common.thecodeisalreadyinuse.msg")));
}
}
if (description == null || description.isEmpty()) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.common.pleaseinsertavaliddescription.msg")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class OperationTypeIoOperation {
/**
* Return the list of {@link OperationType}s
*
* @return the list of {@link OperationType}s. It could be <code>empty</code> or <code>null</code>.
* @return the list of {@link OperationType}s. It could be {@code empty} or {@code null}.
* @throws OHServiceException
*/
public List<OperationType> getOperationType() throws OHServiceException {
Expand All @@ -52,7 +52,7 @@ public List<OperationType> getOperationType() throws OHServiceException {
* Insert an {@link OperationType} in the DB
*
* @param operationType - the {@link OperationType} to insert
* @return <code>true</code> if the {@link OperationType} has been inserted, <code>false</code> otherwise.
* @return {@code true} if the {@link OperationType} has been inserted, {@code false} otherwise.
* @throws OHServiceException
*/
public OperationType newOperationType(OperationType operationType) throws OHServiceException {
Expand All @@ -63,29 +63,28 @@ public OperationType newOperationType(OperationType operationType) throws OHServ
* Update an {@link OperationType}
*
* @param operationType - the {@link OperationType} to update
* @return <code>true</code> if the {@link OperationType} has been updated, <code>false</code> otherwise.
* @return {@code true} if the {@link OperationType} has been updated, {@code false} otherwise.
* @throws OHServiceException
*/
public OperationType updateOperationType(OperationType operationType) throws OHServiceException {
return repository.save(operationType);
}

/**
* Delete an {@link OperationType}
* Delete an {@link OperationType} object. If the object does not exist it is silently ignored. If the
* object is null a {@link OHServiceException} is thrown.
*
* @param operationType - the {@link OperationType} to delete
* @return <code>true</code> if the {@link OperationType} has been deleted, <code>false</code> otherwise.
* @throws OHServiceException
* @throws OHServiceException
*/
public boolean deleteOperationType(OperationType operationType) throws OHServiceException {
public void deleteOperationType(OperationType operationType) throws OHServiceException {
repository.delete(operationType);
return true;
}

/**
* Checks if an {@link OperationType} code has already been used
* @param code - the code
* @return <code>true</code> if the code is already in use, <code>false</code> otherwise.
* @return {@code true} if the code is already in use, {@code false} otherwise.
* @throws OHServiceException
*/
public boolean isCodePresent(String code) throws OHServiceException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class PregnantTreatmentTypeBrowserManager {
private PregnantTreatmentTypeIoOperation ioOperations;

/**
* Return the list of {@link PregnantTreatmentType}s
* Return the list of {@link PregnantTreatmentType}s.
*
* @return the list of {@link PregnantTreatmentType}s
* @throws OHServiceException
Expand All @@ -51,10 +51,10 @@ public List<PregnantTreatmentType> getPregnantTreatmentType() throws OHServiceEx
}

/**
* Insert a {@link PregnantTreatmentType} in the DB
* Insert a {@link PregnantTreatmentType} into the DB.
*
* @param pregnantTreatmentType - the {@link PregnantTreatmentType} to insert
* @return <code>true</code> if the item has been inserted, <code>false</code> otherwise
* @return the newly inserted {@link PregnantTreatmentType} object.
* @throws OHServiceException
*/
public PregnantTreatmentType newPregnantTreatmentType(PregnantTreatmentType pregnantTreatmentType) throws OHServiceException {
Expand All @@ -66,7 +66,7 @@ public PregnantTreatmentType newPregnantTreatmentType(PregnantTreatmentType preg
* Update a {@link PregnantTreatmentType} in the DB
*
* @param pregnantTreatmentType - the {@link PregnantTreatmentType} to update
* @return <code>true</code> if the item has been updated, <code>false</code> otherwise
* @return the updated {@link PregnantTreatmentType} object.
* @throws OHServiceException
*/
public PregnantTreatmentType updatePregnantTreatmentType(PregnantTreatmentType pregnantTreatmentType) throws OHServiceException {
Expand All @@ -75,32 +75,31 @@ public PregnantTreatmentType updatePregnantTreatmentType(PregnantTreatmentType p
}

/**
* Delete a {@link PregnantTreatmentType} in the DB
* Delete a {@link PregnantTreatmentType} in the DB.
*
* @param pregnantTreatmentType - the {@link PregnantTreatmentType} to delete
* @return <code>true</code> if the item has been deleted, <code>false</code> otherwise
* @throws OHServiceException
*/
public boolean deletePregnantTreatmentType(PregnantTreatmentType pregnantTreatmentType) throws OHServiceException {
return ioOperations.deletePregnantTreatmentType(pregnantTreatmentType);
public void deletePregnantTreatmentType(PregnantTreatmentType pregnantTreatmentType) throws OHServiceException {
ioOperations.deletePregnantTreatmentType(pregnantTreatmentType);
}

/**
* Check if the code is already in use
*
* @param code - the code
* @return <code>true</code> if the code is already in use, <code>false</code> otherwise
* @return {@code true} if the code is already in use, {@code false} otherwise
* @throws OHServiceException
*/
public boolean isCodePresent(String code) throws OHServiceException {
return ioOperations.isCodePresent(code);
}

/**
* Verify if the object is valid for CRUD and return a list of errors, if any
* Verify if the object is valid for CRUD and return a list of errors, if any.
*
* @param pregnantTreatmentType
* @param insert <code>true</code> or updated <code>false</code>
* @param insert {@code true} or updated {@code false}
* @throws OHDataValidationException
*/
protected void validatePregnantTreatmentType(PregnantTreatmentType pregnantTreatmentType, boolean insert) throws OHServiceException {
Expand All @@ -112,10 +111,8 @@ protected void validatePregnantTreatmentType(PregnantTreatmentType pregnantTreat
if (key.length() > 10) {
errors.add(new OHExceptionMessage(MessageBundle.formatMessage("angal.common.thecodeistoolongmaxchars.fmt.msg", 10)));
}
if (insert) {
if (isCodePresent(key)) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.common.thecodeisalreadyinuse.msg")));
}
if (insert && isCodePresent(key)) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.common.thecodeisalreadyinuse.msg")));
}
if (StringUtils.isEmpty(pregnantTreatmentType.getDescription())) {
errors.add(new OHExceptionMessage(MessageBundle.getMessage("angal.common.pleaseinsertavaliddescription.msg")));
Expand Down
Loading

0 comments on commit 2ee8069

Please sign in to comment.