diff --git a/assets/docs/resume.html b/assets/docs/resume.html
index db66314d..4ad209ff 100644
--- a/assets/docs/resume.html
+++ b/assets/docs/resume.html
@@ -438,35 +438,55 @@
+
+
+ Obat yang diberikan
+
+
+
+ |
+ Terapi (Farmakologi & Non Farmakologi) Selama Perawatan
+ |
+
+ Terapi (Farmakologi & Non Farmakologi) Waktu Pulang
+ |
+
+
+
+ {{ $dataLen := len .Medications }}
+
+ {{ if gt $dataLen 0 }}
+
+ {{ range .Medications }}
-
- Obat yang diberikan
-
-
- |
- Terapi (Farmakologi & Non Farmakologi) Selawa Perawatan
- |
-
- Terapi (Farmakologi & Non Farmakologi) Selawa Pulang
- |
-
-
- | {{ .NIK }} |
- {{ .NIK }} |
-
-
- | {{ .NIK }} |
- {{ .NIK }} |
-
-
- | {{ .NIK }} |
- {{ .NIK }} |
-
-
- |
+ {{ .DuringTreatment }} |
+ {{ .AtDischarge }} |
+ {{ end }}
-
+
+ {{ if eq $dataLen 1 }}
+ |
+ | |
+ |
+
+ {{ end }}
+ {{ else }}
+
+
+ | |
+ |
+
+
+ | |
+ |
+
+ {{ end }}
+
+
+
+
+
@@ -501,7 +521,11 @@
Blood Pressure
: |
+ {{ if and .BloodPressure (ne .BloodPressure "0/0") (ne .BloodPressure "") }}
{{ .BloodPressure }} mmHg |
+ {{ else }}
+ |
+ {{ end }}
@@ -512,7 +536,11 @@
|
: |
- {{ .BodyTemperature }} C |
+ {{ if ne .BodyTemperature 0.0 }}
+ {{ .BodyTemperature }} C |
+ {{ else }}
+ |
+ {{ end }}
|
@@ -521,7 +549,11 @@
Pulse
: |
- {{ .HeartRate }} x/Menit |
+ {{ if ne .HeartRate 0.0 }}
+ {{ .HeartRate }} x/Menit |
+ {{ else }}
+ |
+ {{ end }}
@@ -535,7 +567,11 @@
: |
- {{ .RespirationRate }} |
+ {{ if ne .RespirationRate 0.0 }}
+ {{ .RespirationRate }} x/Menit |
+ {{ else }}
+ |
+ {{ end }}
diff --git a/internal/domain/main-entities/resume/dto.go b/internal/domain/main-entities/resume/dto.go
index 76e959e5..e7ddf09b 100644
--- a/internal/domain/main-entities/resume/dto.go
+++ b/internal/domain/main-entities/resume/dto.go
@@ -90,6 +90,7 @@ type ValueDto struct {
Discharge DischargeCondition `json:"discharge"`
National NationalProgram `json:"national"`
Management Management `json:"management"`
+ Medication Medication `json:"medication"`
}
type Assessment struct {
@@ -170,3 +171,12 @@ type Management struct {
ConditionOnDischarge string `json:"conditionOnDischarge"` // e.g. "Stable"
DischargeMethod string `json:"dischargeMethod"` // e.g. "Discharged with Doctor's Approval"
}
+
+type MedicationEntry struct {
+ DuringTreatment string `json:"duringTreatment"`
+ AtDischarge string `json:"atDischarge"`
+}
+
+type Medication struct {
+ Medications []MedicationEntry `json:"medications"`
+}
diff --git a/internal/use-case/main-use-case/generate-file/helper.go b/internal/use-case/main-use-case/generate-file/helper.go
index 02800c3a..1f0d0bfd 100644
--- a/internal/use-case/main-use-case/generate-file/helper.go
+++ b/internal/use-case/main-use-case/generate-file/helper.go
@@ -330,6 +330,8 @@ func generateResumeTemplateData(resume er.Resume, event pl.Event, tx *gorm.DB) (
templateData.PainScale = rData.Discharge.PainScale
templateData.ConditionOnDischarge = rData.Management.ConditionOnDischarge
templateData.DischargeMethod = rData.Management.DischargeMethod
+ templateData.Medications = rData.Medication.Medications
+ templateData.Date = pu.GetTimeNow().Format("02-01-2006")
return &templateData, nil
}
diff --git a/internal/use-case/main-use-case/generate-file/tycovar.go b/internal/use-case/main-use-case/generate-file/tycovar.go
index d1d1ed6a..a242f476 100644
--- a/internal/use-case/main-use-case/generate-file/tycovar.go
+++ b/internal/use-case/main-use-case/generate-file/tycovar.go
@@ -65,6 +65,7 @@ type ResumePDF struct {
PainScale int
ConditionOnDischarge string
DischargeMethod string
+ Medications []er.MedicationEntry
// fasyankes
// date
// klinik