Skip to content

Commit

Permalink
OH2-396 | Add a lock mechanism in all the remaining entities without …
Browse files Browse the repository at this point in the history
…it (#479)

* chore:OH2-396 | Add a lock mechanism in all the remaining entities without it

* fix:return dto in place of entity

* chore:update spec fiel
  • Loading branch information
SilverD3 authored Oct 28, 2024
1 parent baa739c commit 80f445d
Show file tree
Hide file tree
Showing 11 changed files with 2,420 additions and 2,308 deletions.
4,627 changes: 2,321 additions & 2,306 deletions openapi/oh.yaml

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/main/java/org/isf/accounting/dto/BillDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ public class BillDTO {
@Schema(description = "user name who create the bill", example = "admin")
private String user;

@Schema(description = "Lock", example = "0")
private int lock;

public Integer getId() {
return this.id;
}
Expand Down Expand Up @@ -181,4 +184,12 @@ public void setBalance(Double balance) {
public void setUser(String user) {
this.user = user;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
11 changes: 11 additions & 0 deletions src/main/java/org/isf/agetype/dto/AgeTypeDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class AgeTypeDTO {
@Schema(description = "The minimum value of the range", example = "0")
private int from;

@Schema(description = "Lock", example = "0")
private int lock;

@NotNull
@Schema(description = "The maximum value of the range", example = "0")
private int to;
Expand Down Expand Up @@ -74,4 +77,12 @@ public void setFrom(int from) {
public void setTo(int to) {
this.to = to;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
4 changes: 2 additions & 2 deletions src/main/java/org/isf/agetype/rest/AgeTypeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ public ResponseEntity<Map<String, String>> getAgeTypeCodeByAge(@RequestParam("ag
* @throws OHServiceException
*/
@GetMapping(value = "/agetypes/{index}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<AgeType> getAgeTypeByIndex(@PathVariable int index) throws OHServiceException {
public ResponseEntity<AgeTypeDTO> getAgeTypeByIndex(@PathVariable int index) throws OHServiceException {
LOGGER.info("Get age type by index: {}", index);
AgeType result = ageTypeManager.getTypeByCode(index);
if (result != null){
return ResponseEntity.ok(result);
return ResponseEntity.ok(mapper.map2DTO(result));
} else {
LOGGER.info("No corresponding age code for the given index");
return ResponseEntity.status(HttpStatus.NO_CONTENT).body(null);
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/org/isf/examination/dto/PatientExaminationDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ public class PatientExaminationDTO {
@Schema(description = "Bowel Function", example = "regular")
private Bowel pex_bowel_desc;

@Schema(description = "Lock", example = "0")
private int lock;

public int getPex_ID() {
return this.pex_ID;
}
Expand Down Expand Up @@ -226,4 +229,12 @@ public void setPex_sat(Double pex_sat) {
public void setPex_note(String pex_note) {
this.pex_note = pex_note;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
11 changes: 11 additions & 0 deletions src/main/java/org/isf/priceslist/dto/PriceDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public class PriceDTO {
@Schema(description = "Price", example = "1500")
private Double price;

@Schema(description = "Lock", example = "0")
private int lock;

private boolean editable;

private int hashCode;
Expand Down Expand Up @@ -127,4 +130,12 @@ public void setEditable(boolean editable) {
public void setHashCode(int hashCode) {
this.hashCode = hashCode;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
11 changes: 11 additions & 0 deletions src/main/java/org/isf/priceslist/dto/PriceListDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ public class PriceListDTO {
@Schema(description = "The currency", example = "FCFA", maxLength = 10)
private String currency;

@Schema(description = "Lock", example = "0")
private int lock;

private int hashCode;

@Schema(accessMode = AccessMode.READ_ONLY)
Expand Down Expand Up @@ -91,4 +94,12 @@ public void setCurrency(String currency) {
public void setHashCode(int hashCode) {
this.hashCode = hashCode;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
11 changes: 11 additions & 0 deletions src/main/java/org/isf/pricesothers/dto/PricesOthersDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public class PricesOthersDTO {
@Schema(description = "The description", maxLength = 100)
private String description;

@Schema(description = "Lock", example = "0")
private int lock;

@NotNull
private boolean opdInclude;

Expand Down Expand Up @@ -127,4 +130,12 @@ public void setUndefined(boolean undefined) {
public void setHashCode(int hashCode) {
this.hashCode = hashCode;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
11 changes: 11 additions & 0 deletions src/main/java/org/isf/supplier/dto/SupplierDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ public class SupplierDTO {
@Schema(description = "The supplier's notes", example = "", maxLength = 200)
private String supNote;

@Schema(description = "Lock", example = "0")
private int lock;

public SupplierDTO() {
}

Expand Down Expand Up @@ -130,4 +133,12 @@ public void setSupEmail(String supEmail) {
public void setSupNote(String supNote) {
this.supNote = supNote;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
10 changes: 10 additions & 0 deletions src/main/java/org/isf/usersettings/dto/UserSettingDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class UserSettingDTO {
@Schema(description = "The value of the user", maxLength = 65535)
private String configValue;

@Schema(description = "Lock", example = "0")
private int lock;

public int getId() {
return id;
}
Expand Down Expand Up @@ -75,4 +78,11 @@ public void setUser(String user) {
this.user = user;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
}
10 changes: 10 additions & 0 deletions src/main/java/org/isf/visits/dto/VisitDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public class VisitDTO {
@Schema(description = "Service done during the visit", maxLength = 45)
private String service;

@Schema(description = "Lock", example = "0")
private int lock;

// @ApiModelProperty(hidden=true)
public int getVisitID() {
return visitID;
Expand Down Expand Up @@ -124,6 +127,13 @@ public void setSms(boolean sms) {
this.sms = sms;
}

public int getLock() {
return lock;
}

public void setLock(int lock) {
this.lock = lock;
}
@Override
public String toString() {
return "VisitDTO{" + ", patient=" + patient + ", date=" + date + ", note='" + note + '\'' + ", sms=" + sms
Expand Down

0 comments on commit 80f445d

Please sign in to comment.