feat/prescription: finalize Prescription
This commit is contained in:
No files matched your search
@@ -19,7 +19,7 @@ type CreateDto struct {
|
||||
Usage string `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IntervalMultiplier *uint16 `json:"intervalMultiplier" validate:"required"`
|
||||
IntervalMultiplier *uint16 `json:"intervalMultiplier"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ type Prescription struct {
|
||||
Status_Code erc.DataStatusCode `json:"status_code"`
|
||||
}
|
||||
|
||||
func (d Prescription) IsNotNew() bool {
|
||||
return d.Status_Code != erc.DSCNew
|
||||
}
|
||||
|
||||
func (d Prescription) IsApproved() bool {
|
||||
return d.Status_Code == erc.DSCDone
|
||||
}
|
||||
@@ -58,6 +58,7 @@ const (
|
||||
SCInactive ActiveStatusCode = "inactive" // Tidak aktif
|
||||
|
||||
DSCNew DataStatusCode = "new" // Baru
|
||||
DSCSubmited DataStatusCode = "submited" // Submited
|
||||
DSCReview DataStatusCode = "review" // Review
|
||||
DSCProcess DataStatusCode = "process" // Proses
|
||||
DSCDone DataStatusCode = "done" // Selesai
|
||||
|
||||
Reference in New Issue
Block a user