rename and adjust upload code into doctypecode
This commit is contained in:
@@ -106,22 +106,22 @@ func setPersonAttachment(input e.CreateDto, event *pl.Event, tx *gorm.DB) (*ep.P
|
||||
|
||||
var removeUrl string
|
||||
switch input.Type_Code {
|
||||
case eru.UCPRN:
|
||||
case eru.DTCPRN:
|
||||
if dataPerson.ResidentIdentityFileUrl != nil {
|
||||
removeUrl = *dataPerson.ResidentIdentityFileUrl
|
||||
}
|
||||
dataPerson.ResidentIdentityFileUrl = &input.FilePath
|
||||
case eru.UCPDL:
|
||||
case eru.DTCPDL:
|
||||
if dataPerson.DrivingLicenseFileUrl != nil {
|
||||
removeUrl = *dataPerson.DrivingLicenseFileUrl
|
||||
}
|
||||
dataPerson.DrivingLicenseFileUrl = &input.FilePath
|
||||
case eru.UCPP:
|
||||
case eru.DTCPP:
|
||||
if dataPerson.PassportFileUrl != nil {
|
||||
removeUrl = *dataPerson.PassportFileUrl
|
||||
}
|
||||
dataPerson.PassportFileUrl = &input.FilePath
|
||||
case eru.UCPFC:
|
||||
case eru.DTCPFC:
|
||||
if dataPerson.FamilyIdentityFileUrl != nil {
|
||||
removeUrl = *dataPerson.FamilyIdentityFileUrl
|
||||
}
|
||||
@@ -164,7 +164,7 @@ func setEncounterDocument(input e.CreateDto, event *pl.Event, tx *gorm.DB) (*ee.
|
||||
Upload_Employee_Id: input.Upload_Employee_Id,
|
||||
}
|
||||
|
||||
if input.Type_Code == eru.UCSEP || input.Type_Code == eru.UCSIPP {
|
||||
if input.Type_Code == eru.DTCSEP || input.Type_Code == eru.DTCSIPP {
|
||||
if len(dataUpload) > 0 {
|
||||
data = dataUpload[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user