From 9e238b4c28605576e20f8ffae4e44d068657af75 Mon Sep 17 00:00:00 2001 From: David B Malkovsky Date: Thu, 21 Nov 2024 05:07:24 -0500 Subject: [PATCH] Chore: fix small typos (#1457) * Chore: fix small typos * Chore: fix small typos --- .../org/isf/lab/service/LabIoOperations.java | 34 +++++++++---------- .../manager/MedicalInventoryManager.java | 4 +-- .../manager/MedicalInventoryRowManager.java | 2 +- .../MedicalInventoryRowIoOperation.java | 4 +-- .../manager/MovStockInsertingManager.java | 6 ++-- .../medicalstockward/model/MedicalWard.java | 4 +-- .../java/org/isf/patient/model/Patient.java | 8 ++--- .../service/PermissionIoOperations.java | 4 +-- .../sms/providers/gsm/GSMGatewayService.java | 2 +- .../isf/telemetry/daemon/TelemetryDaemon.java | 3 +- .../java/org/isf/utils/time/TimeTools.java | 4 +-- .../isf/ward/manager/WardBrowserManager.java | 2 +- 12 files changed, 39 insertions(+), 38 deletions(-) diff --git a/src/main/java/org/isf/lab/service/LabIoOperations.java b/src/main/java/org/isf/lab/service/LabIoOperations.java index 27cb705c4..76a5ee337 100644 --- a/src/main/java/org/isf/lab/service/LabIoOperations.java +++ b/src/main/java/org/isf/lab/service/LabIoOperations.java @@ -129,23 +129,23 @@ public List getLaboratory(String exam, LocalDateTime dateFrom, Local * @throws OHServiceException */ public List getLaboratory(String exam, LocalDateTime dateFrom, LocalDateTime dateTo, Patient patient) throws OHServiceException { - List laboritories = new ArrayList<>(); + List laboratories = new ArrayList<>(); LocalDateTime truncatedDateFrom = TimeTools.truncateToSeconds(dateFrom.with(LocalTime.MIN)); LocalDateTime truncatedDateTo = TimeTools.truncateToSeconds(dateTo.with(LocalTime.MAX)); if (!exam.isEmpty() && patient != null) { - laboritories = repository.findByLabDateBetweenAndExamDescriptionAndPatientCode(truncatedDateFrom, truncatedDateTo, exam, patient.getCode()); + laboratories = repository.findByLabDateBetweenAndExamDescriptionAndPatientCode(truncatedDateFrom, truncatedDateTo, exam, patient.getCode()); } if (!exam.isEmpty() && patient == null) { - laboritories = repository.findByLabDateBetweenAndExamDescriptionOrderByLabDateDesc(truncatedDateFrom, truncatedDateTo, exam); + laboratories = repository.findByLabDateBetweenAndExamDescriptionOrderByLabDateDesc(truncatedDateFrom, truncatedDateTo, exam); } if (patient != null && exam.isEmpty()) { - laboritories = repository.findByLabDateBetweenAndPatientCode(truncatedDateFrom, truncatedDateTo, patient.getCode()); + laboratories = repository.findByLabDateBetweenAndPatientCode(truncatedDateFrom, truncatedDateTo, patient.getCode()); } if (patient == null && exam.isEmpty()) { - laboritories = repository.findByLabDateBetweenOrderByLabDateDesc(truncatedDateFrom, truncatedDateTo); + laboratories = repository.findByLabDateBetweenOrderByLabDateDesc(truncatedDateFrom, truncatedDateTo); } - return laboritories; + return laboratories; } /** @@ -271,11 +271,11 @@ public List getLaboratoryForPrint(String exam, LocalDateTime LocalDateTime truncatedDateFrom = TimeTools.truncateToSeconds(dateFrom.with(LocalTime.MIN)); LocalDateTime truncatedDateTo = TimeTools.truncateToSeconds(dateTo.with(LocalTime.MAX)); - Iterable laboritories = exam != null + Iterable laboratories = exam != null ? repository.findByLabDateBetweenAndExam_DescriptionContainingOrderByExam_Examtype_DescriptionDesc(truncatedDateFrom, truncatedDateTo, exam) : repository.findByLabDateBetweenOrderByExam_Examtype_DescriptionDesc(truncatedDateFrom, truncatedDateTo); - for (Laboratory laboratory : laboritories) { + for (Laboratory laboratory : laboratories) { pLaboratory.add(new LaboratoryForPrint( laboratory.getCode(), laboratory.getExam(), @@ -328,9 +328,9 @@ private Laboratory updateLaboratory(Laboratory laboratory) throws OHServiceExcep * @throws OHServiceException */ public Laboratory updateLabFirstProcedure(Laboratory laboratory) throws OHServiceException { - Laboratory updatedLaborator = updateLaboratory(laboratory); - rowRepository.deleteByLaboratory_Code(updatedLaborator.getCode()); - return updatedLaborator; + Laboratory updatedLaboratory = updateLaboratory(laboratory); + rowRepository.deleteByLaboratory_Code(updatedLaboratory.getCode()); + return updatedLaboratory; } /** @@ -385,23 +385,23 @@ public Optional getLaboratory(int code) throws OHServiceException { public PagedResponse getLaboratoryPageable(String exam, LocalDateTime dateFrom, LocalDateTime dateTo, Patient patient, int page, int size) throws OHServiceException { - Page laboritories = null; + Page laboratories = null; LocalDateTime truncatedDateFrom = TimeTools.truncateToSeconds(dateFrom.with(LocalTime.MIN)); LocalDateTime truncatedDateTo = TimeTools.truncateToSeconds(dateTo.with(LocalTime.MAX)); if (exam != null && patient != null) { - laboritories = repository.findByLabDateBetweenAndExamDescriptionAndPatientCodePage(truncatedDateFrom, truncatedDateTo, exam, patient, PageRequest.of(page, size)); + laboratories = repository.findByLabDateBetweenAndExamDescriptionAndPatientCodePage(truncatedDateFrom, truncatedDateTo, exam, patient, PageRequest.of(page, size)); } if (exam != null && patient == null) { - laboritories = repository.findByLabDateBetweenAndExam_DescriptionOrderByLabDateDescPage(truncatedDateFrom, truncatedDateTo, exam, PageRequest.of(page, size)); + laboratories = repository.findByLabDateBetweenAndExam_DescriptionOrderByLabDateDescPage(truncatedDateFrom, truncatedDateTo, exam, PageRequest.of(page, size)); } if (patient != null && exam == null) { - laboritories = repository.findByLabDateBetweenAndPatientCodePage(truncatedDateFrom, truncatedDateTo, patient, PageRequest.of(page, size)); + laboratories = repository.findByLabDateBetweenAndPatientCodePage(truncatedDateFrom, truncatedDateTo, patient, PageRequest.of(page, size)); } if (patient == null && exam == null) { - laboritories = repository.findByLabDateBetweenOrderByLabDateDescPage(truncatedDateFrom, truncatedDateTo, PageRequest.of(page, size)); + laboratories = repository.findByLabDateBetweenOrderByLabDateDescPage(truncatedDateFrom, truncatedDateTo, PageRequest.of(page, size)); } - return setPaginationData(laboritories); + return setPaginationData(laboratories); } PagedResponse setPaginationData(Page pages) { diff --git a/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryManager.java b/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryManager.java index 778ed63da..aa848182c 100644 --- a/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryManager.java +++ b/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryManager.java @@ -362,8 +362,8 @@ public void validateMedicalInventoryRow(MedicalInventory inventory, List inventoryRows = medicalInventoryRowManager.getMedicalInventoryRowByInventoryId(invenotyId); + int inventoryId = medicalInventory.getId(); + List inventoryRows = medicalInventoryRowManager.getMedicalInventoryRowByInventoryId(inventoryId); for (MedicalInventoryRow invRow : inventoryRows) { boolean isNewLot = invRow.isNewLot(); Lot lot = invRow.getLot(); diff --git a/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryRowManager.java b/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryRowManager.java index d1c494349..f688ffa67 100644 --- a/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryRowManager.java +++ b/src/main/java/org/isf/medicalinventory/manager/MedicalInventoryRowManager.java @@ -83,7 +83,7 @@ public void deleteMedicalInventoryRow(MedicalInventoryRow medicalInventoryRow) t /** * Return a list of {@link MedicalInventoryRow}s for passed params. * - * @param inventoryId - the Invetory Id. + * @param inventoryId - the Inventory Id. * @return the list of {@link MedicalInventoryRow}s. It could be {@code empty}. * @throws OHServiceException */ diff --git a/src/main/java/org/isf/medicalinventory/service/MedicalInventoryRowIoOperation.java b/src/main/java/org/isf/medicalinventory/service/MedicalInventoryRowIoOperation.java index 80535064c..eb5508738 100644 --- a/src/main/java/org/isf/medicalinventory/service/MedicalInventoryRowIoOperation.java +++ b/src/main/java/org/isf/medicalinventory/service/MedicalInventoryRowIoOperation.java @@ -75,7 +75,7 @@ public void deleteMedicalInventoryRow(MedicalInventoryRow medicalInventoryRow) t /** * Return a list of {@link MedicalInventoryRow}s for passed params. - * @param inventoryId - the Invetory Id. + * @param inventoryId - the Inventory Id. * @return the list of {@link MedicalInventoryRow}s. It could be {@code empty}. * @throws OHServiceException */ @@ -86,7 +86,7 @@ public List getMedicalInventoryRowByInventoryId(int invento /** * Return {@link MedicalInventoryRow} for passed param. - * @param id - the Invetoryrow Id. + * @param id - the InventoryRow Id. * @return {@link MedicalInventoryRow} with the specified id, {@code null} otherwise. * @throws OHServiceException */ diff --git a/src/main/java/org/isf/medicalstock/manager/MovStockInsertingManager.java b/src/main/java/org/isf/medicalstock/manager/MovStockInsertingManager.java index 19b586dd3..3cecf561b 100644 --- a/src/main/java/org/isf/medicalstock/manager/MovStockInsertingManager.java +++ b/src/main/java/org/isf/medicalstock/manager/MovStockInsertingManager.java @@ -270,7 +270,7 @@ public List getLotByMedical(Medical medical) throws OHServiceException { /** * Retrieves all the {@link Lot} associated to the specified {@link Medical}, expiring first on top, zero quantities will be stripped out if - * {@code removeEmtpy} is set to true. + * {@code removeEmpty} is set to true. * * @param medical the medical. * @param removeEmpty @@ -430,7 +430,7 @@ public List newMultipleDischargingMovements(List movements, List dischargingMovements = new ArrayList<>(); for (Movement mov : movements) { try { - dischargingMovements.addAll(prepareDishargingMovement(mov, checkReference)); + dischargingMovements.addAll(prepareDischargingMovement(mov, checkReference)); } catch (OHServiceException e) { List errors = e.getMessages(); errors.add(new OHExceptionMessage(mov.getMedical().getDescription())); @@ -460,7 +460,7 @@ public Lot storeLot(String lotCode, Lot lot, Medical medical) throws OHServiceEx * @param checkReference - if {@code true} every movement must have unique reference number * @throws OHServiceException */ - private List prepareDishargingMovement(Movement movement, boolean checkReference) throws OHServiceException { + private List prepareDischargingMovement(Movement movement, boolean checkReference) throws OHServiceException { validateMovement(movement, checkReference); if (isAutomaticLotOut()) { return ioOperations.newAutomaticDischargingMovement(movement); diff --git a/src/main/java/org/isf/medicalstockward/model/MedicalWard.java b/src/main/java/org/isf/medicalstockward/model/MedicalWard.java index 71bf27736..c9f239be5 100644 --- a/src/main/java/org/isf/medicalstockward/model/MedicalWard.java +++ b/src/main/java/org/isf/medicalstockward/model/MedicalWard.java @@ -88,13 +88,13 @@ public MedicalWard(Ward ward, Medical medical, float inQuantity, float outQuanti } - public MedicalWard(Medical med, double qanty, Lot lot) { + public MedicalWard(Medical med, double quantity, Lot lot) { super(); this.id = new MedicalWardId(); this.id.setMedical(med); this.id.setLot(lot); - this.qty = qanty; + this.qty = quantity; } public MedicalWardId getId() { diff --git a/src/main/java/org/isf/patient/model/Patient.java b/src/main/java/org/isf/patient/model/Patient.java index 182889517..1828b309d 100644 --- a/src/main/java/org/isf/patient/model/Patient.java +++ b/src/main/java/org/isf/patient/model/Patient.java @@ -225,7 +225,7 @@ public Patient(Opd opd) { public Patient(String firstName, String secondName, LocalDate birthDate, int age, String agetype, char sex, String address, String city, String nextKin, String telephone, String motherName, char mother, String fatherName, char father, - String bloodType, char economicStatut, char parentTogether, String personalCode, + String bloodType, char economicStatus, char parentTogether, String personalCode, String maritalStatus, String profession) { //Changed EduLev with bloodType this.firstName = firstName; this.secondName = secondName; @@ -242,7 +242,7 @@ public Patient(String firstName, String secondName, LocalDate birthDate, int age this.mother = mother; this.fatherName = fatherName; this.father = father; - this.hasInsurance = economicStatut; + this.hasInsurance = economicStatus; this.bloodType = bloodType; this.parentTogether = parentTogether; this.taxCode = personalCode; @@ -253,7 +253,7 @@ public Patient(String firstName, String secondName, LocalDate birthDate, int age public Patient(int code, String firstName, String secondName, String name, LocalDate birthDate, int age, String agetype, char sex, String address, String city, String nextKin, String telephone, String note, String motherName, char mother, String fatherName, char father, - String bloodType, char economicStatut, char parentTogether, String taxCode, + String bloodType, char economicStatus, char parentTogether, String taxCode, String maritalStatus, String profession) { //Changed EduLev with bloodType this.code = code; this.firstName = firstName; @@ -272,7 +272,7 @@ public Patient(int code, String firstName, String secondName, String name, Local this.mother = mother; this.fatherName = fatherName; this.father = father; - this.hasInsurance = economicStatut; + this.hasInsurance = economicStatus; this.bloodType = bloodType; this.parentTogether = parentTogether; this.taxCode = taxCode; diff --git a/src/main/java/org/isf/permissions/service/PermissionIoOperations.java b/src/main/java/org/isf/permissions/service/PermissionIoOperations.java index e8a8aef42..f03ca5c11 100644 --- a/src/main/java/org/isf/permissions/service/PermissionIoOperations.java +++ b/src/main/java/org/isf/permissions/service/PermissionIoOperations.java @@ -44,8 +44,8 @@ public List findByIdIn(List ids) { return repository.findByIdIn(ids); } - public List retrivePermisionsByGroupCode(String userGropupCode) throws OHServiceException { - return repository.findAllByUserGroupCode(userGropupCode); + public List retrivePermisionsByGroupCode(String userGroupCode) throws OHServiceException { + return repository.findAllByUserGroupCode(userGroupCode); } public List retrievePermissionsByCurrentLoggedInUser(String currentUserName) throws OHServiceException { diff --git a/src/main/java/org/isf/sms/providers/gsm/GSMGatewayService.java b/src/main/java/org/isf/sms/providers/gsm/GSMGatewayService.java index ff55ccfc4..bf6e6b025 100644 --- a/src/main/java/org/isf/sms/providers/gsm/GSMGatewayService.java +++ b/src/main/java/org/isf/sms/providers/gsm/GSMGatewayService.java @@ -103,7 +103,7 @@ public boolean initialize() { connected = true; } else { - LOGGER.debug("A problem occured on output stream"); + LOGGER.debug("A problem occurred on output stream"); } } catch (PortInUseException e) { diff --git a/src/main/java/org/isf/telemetry/daemon/TelemetryDaemon.java b/src/main/java/org/isf/telemetry/daemon/TelemetryDaemon.java index 24bca313a..ef815c57f 100644 --- a/src/main/java/org/isf/telemetry/daemon/TelemetryDaemon.java +++ b/src/main/java/org/isf/telemetry/daemon/TelemetryDaemon.java @@ -106,6 +106,7 @@ public static TelemetryDaemon getTelemetryDaemon() { return instance; } + @Override public void run() { while (running) { if (reloadSettings) { @@ -194,7 +195,7 @@ public Map getGeoIpServicesUrlMap() { } /** - * Returns the neame of the geoIpService selected + * Returns the name of the geoIpService selected * @return the geoIpService */ public String getGeoIpServiceSelected() { diff --git a/src/main/java/org/isf/utils/time/TimeTools.java b/src/main/java/org/isf/utils/time/TimeTools.java index 9f9c1d18e..8b30adf02 100644 --- a/src/main/java/org/isf/utils/time/TimeTools.java +++ b/src/main/java/org/isf/utils/time/TimeTools.java @@ -182,7 +182,7 @@ public static String formatDateTimeReport(LocalDateTime time) { * Return a string representation of the dateTime in the form "yyyy-MM-dd HH:mm:ss" * * @param date - a Date object - * @return the String represetation of the Date + * @return the String representation of the Date */ public static String formatDateTimeReport(LocalDate date) { LocalDateTime time = date.atStartOfDay(); @@ -193,7 +193,7 @@ public static String formatDateTimeReport(LocalDate date) { * Truncate date time to SECONDS only if value is non-null * * @param dateTime - * @return LocaleDateTime turncated to seconds + * @return LocaleDateTime truncated to seconds */ public static LocalDateTime truncateToSeconds(LocalDateTime dateTime) { return dateTime == null ? null : dateTime.truncatedTo(ChronoUnit.SECONDS); diff --git a/src/main/java/org/isf/ward/manager/WardBrowserManager.java b/src/main/java/org/isf/ward/manager/WardBrowserManager.java index 957ba5622..3c30bf71f 100644 --- a/src/main/java/org/isf/ward/manager/WardBrowserManager.java +++ b/src/main/java/org/isf/ward/manager/WardBrowserManager.java @@ -39,7 +39,7 @@ /** * Class that provides gui separation from database operations and gives some - * useful logic manipulations of the dinamic data (memory) + * useful logic manipulations of the dynamic data (memory) * * @author Rick */