Skip to content

Commit

Permalink
Chore: fix small typos (#1457)
Browse files Browse the repository at this point in the history
* Chore: fix small typos

* Chore: fix small typos
  • Loading branch information
dbmalkovsky authored Nov 21, 2024
1 parent 98bf65b commit 9e238b4
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 38 deletions.
34 changes: 17 additions & 17 deletions src/main/java/org/isf/lab/service/LabIoOperations.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,23 @@ public List<Laboratory> getLaboratory(String exam, LocalDateTime dateFrom, Local
* @throws OHServiceException
*/
public List<Laboratory> getLaboratory(String exam, LocalDateTime dateFrom, LocalDateTime dateTo, Patient patient) throws OHServiceException {
List<Laboratory> laboritories = new ArrayList<>();
List<Laboratory> 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;
}

/**
Expand Down Expand Up @@ -271,11 +271,11 @@ public List<LaboratoryForPrint> getLaboratoryForPrint(String exam, LocalDateTime
LocalDateTime truncatedDateFrom = TimeTools.truncateToSeconds(dateFrom.with(LocalTime.MIN));
LocalDateTime truncatedDateTo = TimeTools.truncateToSeconds(dateTo.with(LocalTime.MAX));

Iterable<Laboratory> laboritories = exam != null
Iterable<Laboratory> 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(),
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -385,23 +385,23 @@ public Optional<Laboratory> getLaboratory(int code) throws OHServiceException {

public PagedResponse<Laboratory> getLaboratoryPageable(String exam, LocalDateTime dateFrom, LocalDateTime dateTo, Patient patient, int page, int size)
throws OHServiceException {
Page<Laboratory> laboritories = null;
Page<Laboratory> 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<Laboratory> setPaginationData(Page<Laboratory> pages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ public void validateMedicalInventoryRow(MedicalInventory inventory, List<Medical
* @throws OHServiceException if an error occurs during the operation.
*/
public void deleteInventory(MedicalInventory medicalInventory) throws OHServiceException {
int invenotyId = medicalInventory.getId();
List<MedicalInventoryRow> inventoryRows = medicalInventoryRowManager.getMedicalInventoryRowByInventoryId(invenotyId);
int inventoryId = medicalInventory.getId();
List<MedicalInventoryRow> inventoryRows = medicalInventoryRowManager.getMedicalInventoryRowByInventoryId(inventoryId);
for (MedicalInventoryRow invRow : inventoryRows) {
boolean isNewLot = invRow.isNewLot();
Lot lot = invRow.getLot();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -86,7 +86,7 @@ public List<MedicalInventoryRow> 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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public List<Lot> 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
Expand Down Expand Up @@ -430,7 +430,7 @@ public List<Movement> newMultipleDischargingMovements(List<Movement> movements,
List<Movement> dischargingMovements = new ArrayList<>();
for (Movement mov : movements) {
try {
dischargingMovements.addAll(prepareDishargingMovement(mov, checkReference));
dischargingMovements.addAll(prepareDischargingMovement(mov, checkReference));
} catch (OHServiceException e) {
List<OHExceptionMessage> errors = e.getMessages();
errors.add(new OHExceptionMessage(mov.getMedical().getDescription()));
Expand Down Expand Up @@ -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<Movement> prepareDishargingMovement(Movement movement, boolean checkReference) throws OHServiceException {
private List<Movement> prepareDischargingMovement(Movement movement, boolean checkReference) throws OHServiceException {
validateMovement(movement, checkReference);
if (isAutomaticLotOut()) {
return ioOperations.newAutomaticDischargingMovement(movement);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/isf/medicalstockward/model/MedicalWard.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/isf/patient/model/Patient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public List<Permission> findByIdIn(List<Integer> ids) {
return repository.findByIdIn(ids);
}

public List<Permission> retrivePermisionsByGroupCode(String userGropupCode) throws OHServiceException {
return repository.findAllByUserGroupCode(userGropupCode);
public List<Permission> retrivePermisionsByGroupCode(String userGroupCode) throws OHServiceException {
return repository.findAllByUserGroupCode(userGroupCode);
}

public List<Permission> retrievePermissionsByCurrentLoggedInUser(String currentUserName) throws OHServiceException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/isf/telemetry/daemon/TelemetryDaemon.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public static TelemetryDaemon getTelemetryDaemon() {
return instance;
}

@Override
public void run() {
while (running) {
if (reloadSettings) {
Expand Down Expand Up @@ -194,7 +195,7 @@ public Map<String, String> getGeoIpServicesUrlMap() {
}

/**
* Returns the neame of the geoIpService selected
* Returns the name of the geoIpService selected
* @return the geoIpService
*/
public String getGeoIpServiceSelected() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/isf/utils/time/TimeTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/isf/ward/manager/WardBrowserManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 9e238b4

Please sign in to comment.