upload finish
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- Modify "FileAttachment" table
|
||||
ALTER TABLE "public"."FileAttachment" DROP CONSTRAINT "fk_Encounter_FileAttachments";
|
||||
@@ -1,4 +1,4 @@
|
||||
h1:/ysf2SIdpKcuSzvAPNWONxzu08MCf8eE5krteU4Chas=
|
||||
h1:bPQtdFQustm+bzfbxrIgoD7sYhMS7+D4qaSmiyN6LUA=
|
||||
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
||||
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
||||
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
||||
@@ -109,3 +109,4 @@ h1:/ysf2SIdpKcuSzvAPNWONxzu08MCf8eE5krteU4Chas=
|
||||
20251110100258.sql h1:IBqt1VZj5WjQ+l9aAFGHOCCBtzb03KlLLihFLut7itg=
|
||||
20251110100545.sql h1:6/LV7751iyKxE2xI6vO1zly+aHUwxXD/IBwLcVpKxqM=
|
||||
20251111040358.sql h1:c/RQSoA8yZl7cAcOv7n1RchmudPj7LdL3PEBdNvCUrA=
|
||||
20251111085815.sql h1:zY86Sl4p7yLEHvn9oJTjsK+yo5HfF4LsPa+uRHzsAeU=
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
ed "simrs-vx/internal/domain/main-entities/doctor"
|
||||
eem "simrs-vx/internal/domain/main-entities/emergency"
|
||||
ee "simrs-vx/internal/domain/main-entities/employee"
|
||||
efa "simrs-vx/internal/domain/main-entities/file-attachment"
|
||||
eip "simrs-vx/internal/domain/main-entities/inpatient"
|
||||
ei "simrs-vx/internal/domain/main-entities/insurance-company"
|
||||
eir "simrs-vx/internal/domain/main-entities/internal-reference"
|
||||
@@ -71,7 +70,6 @@ type Encounter struct {
|
||||
Inpatient *eip.Inpatient `json:"inpatient,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
Rehab *er.Basic `json:"rehab,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
RehabChildren *[]er.Basic `json:"rehabChildren,omitempty" gorm:"foreignKey:Parent_Encounter_Id;references:Id"`
|
||||
FileAttachments *[]efa.FileAttachment `json:"fileAttachments,omitempty" gorm:"foreignKey:Ref_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d Encounter) IsDone() bool {
|
||||
|
||||
@@ -49,7 +49,7 @@ func uploadAndGenerateFileUrl(input e.CreateDto, event *pl.Event) (string, error
|
||||
if !puh.IsValidFileType(ext, bucket) {
|
||||
return "", fmt.Errorf("invalid file type: %s", input.Filename)
|
||||
}
|
||||
objectName := fmt.Sprintf("%s%d%s", input.Type_Code, time.Now().UnixNano(), ext)
|
||||
objectName := fmt.Sprintf("%v/%s-%d%s", *input.Ref_Id, input.Type_Code, time.Now().UnixNano(), ext)
|
||||
|
||||
uploadInput := pmh.UploadReaderInput{
|
||||
BucketName: bucket,
|
||||
|
||||
Reference in New Issue
Block a user