Skip to content

Commit

Permalink
update: Add operation context in OperationDTO (#477)
Browse files Browse the repository at this point in the history
Co-authored-by: SteveGT96 <[email protected]>
  • Loading branch information
SteveGT96 and SteveGT96 authored Oct 10, 2024
1 parent 7ad3780 commit 54df140
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 49 deletions.
77 changes: 43 additions & 34 deletions openapi/oh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6219,14 +6219,14 @@ components:
description: lock
format: int32
example: 0
opd:
male:
type: boolean
female:
type: boolean
male:
type: boolean
pharmacy:
type: boolean
opd:
type: boolean
PatientDTO:
required:
- age
Expand Down Expand Up @@ -6779,6 +6779,7 @@ components:
- code
- description
- major
- opeFor
- type
type: object
properties:
Expand All @@ -6792,6 +6793,14 @@ components:
description: The operation description
type:
$ref: '#/components/schemas/OperationTypeDTO'
opeFor:
type: string
description: The operation context
example: opd_admission
enum:
- opd_admission
- admission
- opd
major:
type: integer
description: The operation major
Expand Down Expand Up @@ -8306,16 +8315,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
rect:
Expand All @@ -8341,16 +8350,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
writeOnly: true
Expand Down Expand Up @@ -8466,16 +8475,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
rect:
Expand All @@ -8501,16 +8510,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
writeOnly: true
Expand Down Expand Up @@ -8555,16 +8564,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
clipRect:
Expand Down Expand Up @@ -8625,16 +8634,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
rect:
Expand All @@ -8660,16 +8669,16 @@ components:
height:
type: number
format: double
minX:
x:
type: number
format: double
minY:
"y":
type: number
format: double
x:
minX:
type: number
format: double
"y":
minY:
type: number
format: double
writeOnly: true
Expand Down Expand Up @@ -8753,13 +8762,13 @@ components:
smsInt:
type: integer
format: int32
medical:
type: integer
format: int32
sms:
type: boolean
notify:
type: boolean
medical:
type: integer
format: int32
TherapyDTO:
type: object
properties:
Expand Down
35 changes: 20 additions & 15 deletions src/main/java/org/isf/operation/dto/OperationDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

import jakarta.validation.constraints.NotNull;

import org.isf.operation.enums.OperationTarget;
import org.isf.opetype.dto.OperationTypeDTO;

import io.swagger.v3.oas.annotations.media.Schema;
Expand All @@ -41,6 +42,10 @@ public class OperationDTO {
@Schema(description = "The operation type")
private OperationTypeDTO type;

@NotNull
@Schema(description = "The operation context", example = "opd_admission")
private OperationTarget opeFor;

@NotNull
@Schema(description = "The operation major")
private Integer major;
Expand All @@ -59,33 +64,33 @@ public void setLock(int lock) {
public String getCode() {
return this.code;
}

public void setCode(String code) {
this.code = code;
}
public String getDescription() {
return this.description;
}

public void setDescription(String description) {
this.description = description;
}
public OperationTypeDTO getType() {
return this.type;
}

public void setType(OperationTypeDTO type) {
this.type = type;
}
public Integer getMajor() {
return this.major;
}

public void setCode(String code) {
this.code = code;
}

public void setDescription(String description) {
this.description = description;
public void setMajor(Integer major) {
this.major = major;
}

public void setType(OperationTypeDTO type) {
this.type = type;
public OperationTarget getOpeFor() {
return this.opeFor;
}

public void setMajor(Integer major) {
this.major = major;
public void setOpeFor(OperationTarget opeFor) {
this.opeFor = opeFor;
}

}

0 comments on commit 54df140

Please sign in to comment.