feat (patient): upload done
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
package patient
|
||||
|
||||
import (
|
||||
"mime/multipart"
|
||||
"time"
|
||||
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
ep "simrs-vx/internal/domain/main-entities/person"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
epc "simrs-vx/internal/domain/main-entities/person-contact"
|
||||
epr "simrs-vx/internal/domain/main-entities/person-relative"
|
||||
erc "simrs-vx/internal/domain/references/common"
|
||||
"time"
|
||||
ere "simrs-vx/internal/domain/references/encounter"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -56,6 +59,17 @@ type SearchDto struct {
|
||||
Search string `json:"search"`
|
||||
}
|
||||
|
||||
type UploadDto struct {
|
||||
Id uint `json:"-"`
|
||||
Code ere.UploadCode `json:"-"`
|
||||
File multipart.File `json:"-"`
|
||||
FileHeader *multipart.FileHeader `json:"-"`
|
||||
Filename string `json:"-"`
|
||||
Size int64 `json:"-"`
|
||||
MimeType string `json:"-"`
|
||||
MedRecNumber string `json:"-"`
|
||||
}
|
||||
|
||||
type MetaDto struct {
|
||||
PageNumber int `json:"page_number"`
|
||||
PageSize int `json:"page_size"`
|
||||
|
||||
@@ -85,3 +85,12 @@ func (ec EncounterClassCode) Code() string {
|
||||
return "UNKNOWN"
|
||||
}
|
||||
}
|
||||
|
||||
func IsValidUploadCode(code UploadCode) bool {
|
||||
switch UploadCode(code) {
|
||||
case UCPRN, UCPDL, UCPP, UCPFC, UCMIR:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user