Merge branch 'migration' of github.com:dikstub-rssa/simrs-be into feat/medicine-mix-prescription-37
This commit is contained in:
@@ -13,11 +13,14 @@ type CreateDto struct {
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Usage float64 `json:"usage"`
|
||||
Frequency *uint16 `json:"frequency"`
|
||||
Dose float64 `json:"dose"`
|
||||
Usage string `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
Note *string `json:"note" gorm:"size:1024"`
|
||||
}
|
||||
|
||||
@@ -71,7 +74,7 @@ type ResponseDto struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty"`
|
||||
Usage float64 `json:"usage"`
|
||||
Usage string `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
|
||||
@@ -18,7 +18,9 @@ type MedicationItem struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty" gorm:"foreignKey:Medicine_Id;references:Id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty" gorm:"foreignKey:MedicineMix_Id;references:Id"`
|
||||
Usage float64 `json:"usage"`
|
||||
Frequency *uint16 `json:"frequency"`
|
||||
Dose float64 `json:"dose"`
|
||||
Usage string `json:"usage" gorm:"size:255"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IsRedeemed bool `json:"isRedeemed"`
|
||||
|
||||
@@ -3,10 +3,13 @@ package medicinemix
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
emmi "simrs-vx/internal/domain/main-entities/medicine-mix-item"
|
||||
eu "simrs-vx/internal/domain/main-entities/uom"
|
||||
)
|
||||
|
||||
type MedicineMix struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Uom_Code *string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
MixItems []*emmi.MedicineMixItem `json:"mixItems" gorm:"foreignKey:MedicineMix_Id;references:Id"`
|
||||
}
|
||||
|
||||
@@ -9,14 +9,16 @@ import (
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
Prescription_Id *uint `json:"prescription_id"`
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
Prescription_Id *uint `json:"prescription_id"`
|
||||
IsMix bool `json:"isMix"`
|
||||
Medicine_Id *uint `json:"medicine_id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
Frequency *uint16 `json:"frequency"`
|
||||
Dose float64 `json:"dose"`
|
||||
Usage float64 `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
IntervalMultiplier *uint16 `json:"intervalMultiplier"`
|
||||
}
|
||||
|
||||
type ReadListDto struct {
|
||||
@@ -67,7 +69,9 @@ type ResponseDto struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty"`
|
||||
Usage float64 `json:"usage"`
|
||||
Frequency *uint16 `json:"frequency"`
|
||||
Dose float64 `json:"dose"`
|
||||
Usage string `json:"usage"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
@@ -82,6 +86,8 @@ func (d PrescriptionItem) ToResponse() ResponseDto {
|
||||
Medicine: d.Medicine,
|
||||
MedicineMix_Id: d.MedicineMix_Id,
|
||||
MedicineMix: d.MedicineMix,
|
||||
Frequency: d.Frequency,
|
||||
Dose: d.Dose,
|
||||
Usage: d.Usage,
|
||||
Interval: d.Interval,
|
||||
IntervalUnit_Code: d.IntervalUnit_Code,
|
||||
|
||||
@@ -18,7 +18,9 @@ type PrescriptionItem struct {
|
||||
Medicine *em.Medicine `json:"medicine,omitempty" gorm:"foreignKey:Medicine_Id;references:Id"`
|
||||
MedicineMix_Id *uint `json:"medicineMix_id"`
|
||||
MedicineMix *emm.MedicineMix `json:"medicineMix,omitempty" gorm:"foreignKey:MedicineMix_Id;references:Id"`
|
||||
Usage float64 `json:"usage"`
|
||||
Frequency *uint16 `json:"frequency"`
|
||||
Dose float64 `json:"dose"`
|
||||
Usage string `json:"usage" gorm:"size:255"`
|
||||
Interval uint8 `json:"interval"`
|
||||
IntervalUnit_Code erc.TimeUnitCode `json:"intervalUnit_code"`
|
||||
Quantity float64 `json:"quantity"`
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
package soapi
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eem "simrs-vx/internal/domain/main-entities/employee"
|
||||
ee "simrs-vx/internal/domain/main-entities/encounter"
|
||||
"time"
|
||||
|
||||
erc "simrs-vx/internal/domain/references/clinical"
|
||||
)
|
||||
|
||||
type Soapi struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *eem.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
Time *time.Time `json:"time"`
|
||||
Value *string `json:"value"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Encounter_Id *uint `json:"encounter_id"`
|
||||
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Employee_Id *uint `json:"employee_id"`
|
||||
Employee *eem.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
|
||||
Time *time.Time `json:"time"`
|
||||
TypeCode erc.SoapiTypeCode `json:"type_code" gorm:"size:11"`
|
||||
Value *string `json:"value"`
|
||||
}
|
||||
|
||||
@@ -8,11 +8,12 @@ type (
|
||||
PlanCode string
|
||||
InstructionCode string
|
||||
McuUrgencyLevelCode string
|
||||
SoapiTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
SCPrimaryComplaint SubjectCode = "pri-compl" // Keluhan Utama
|
||||
SCSecComplaint SubjectCode = "sec-compl" // Secondary Complaint
|
||||
SCPrimaryComplaint SubjectCode = "pri-complain" // Keluhan Utama
|
||||
SCSecComplaint SubjectCode = "sec-complain" // Secondary Complaint
|
||||
SCCurrentDiseaseHistory SubjectCode = "cur-disea-hist" // Current Disease History
|
||||
SCPastDiseaseHistory SubjectCode = "pas-disea-hist" // Past Disease History
|
||||
SCFamilyDiseaseHistory SubjectCode = "fam-disea-hist" // Family Disease History
|
||||
@@ -47,6 +48,10 @@ const (
|
||||
MULCBG McuUrgencyLevelCode = "blood-gas"
|
||||
MULCPF McuUrgencyLevelCode = "priority-form"
|
||||
MULCRT McuUrgencyLevelCode = "routine"
|
||||
|
||||
STCEarly SoapiTypeCode = "early" // Kajian Awal Medis
|
||||
STCERehab SoapiTypeCode = "early-rehab" // Kajian Awal Rehab Medik
|
||||
STCFunc SoapiTypeCode = "function" // Assessment Fungsi
|
||||
)
|
||||
|
||||
type Soapi struct {
|
||||
|
||||
@@ -15,6 +15,8 @@ const (
|
||||
UPCLab UserPosisitionCode = "laborant" // Laboran
|
||||
UPCPha UserPosisitionCode = "pharmacy" // Farmasi
|
||||
UPCPay UserPosisitionCode = "payment" // Pembayaran
|
||||
UPCHur UserPosisitionCode = "human-resource" // Sumber Daya Manusia
|
||||
UPCGea UserPosisitionCode = "general-affair" // Bagian Umu
|
||||
UPCPav UserPosisitionCode = "payment-verificator" // Konfirmasi pembayaran
|
||||
UPCMan UserPosisitionCode = "management" // Manajemen
|
||||
UPCInt UserPosisitionCode = "specialist-intern" // PPDS
|
||||
|
||||
Reference in New Issue
Block a user