Merge branch 'migration' of https://github.com/dikstub-rssa/simrs-be into migration

This commit is contained in:
Hasyim Kai
2025-12-16 13:22:59 +07:00
338 changed files with 12437 additions and 3285 deletions
+2
View File
@@ -27,6 +27,8 @@ go.work.sum
# env file
.env
config.yml
Dockerfile-main-api
Dockerfile-sync-api
**/atlas.hcl
!**/atlas.hcl.example
+14
View File
@@ -0,0 +1,14 @@
FROM golang:1.24.10 AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o ./cmd/main-api/main-api ./cmd/main-api/main.go
FROM alpine:latest
WORKDIR /app
COPY --from=builder /src/assets .
COPY --from=builder /src/cmd/main-api/main-api .
COPY --from=builder /src/cmd/main-api/config.yml .
EXPOSE 8010
CMD ["./main-api"]
+14
View File
@@ -0,0 +1,14 @@
FROM golang:1.24.10 AS builder
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o ./cmd/simgos-sync-api/simgos-sync-api ./cmd/simgos-sync-api/main.go
FROM alpine:latest
WORKDIR /app
COPY --from=builder /src/assets .
COPY --from=builder /src/cmd/simgos-sync-api/simgos-sync-api .
COPY --from=builder /src/cmd/simgos-sync-api/config.yml .
EXPOSE 8011
CMD ["./simgos-sync-api"]
+167
View File
@@ -0,0 +1,167 @@
<html>
<head>
<meta charset="UTF-8" />
<style>
body {
padding: 2rem 3rem;
}
table {
width: 100%;
border-collapse: collapse
}
td {
vertical-align: top;
}
.border-table,
.border-table td,
.border-table th {
border: 1px solid black;
}
.section-title {
margin-top: 1rem;
margin-bottom: 0rem;
}
.data-label {
width: 9rem;
}
.data-colon {
width: 0.1234rem;
}
</style>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.4">
<!-- Tanggal Terbit (top-right) -->
<div style="
text-align: right;
margin-right: 2rem;
font-size: 0.95rem;
margin-top: 0.5rem;
">
Tanggal Terbit : {{ .IssuedDate }}
</div>
<!-- Patient Info Box -->
<table
style="
margin-top: 1rem;
margin-left: auto;
margin-right: 2rem; /* space from right like example */
border: 1px solid #000;
padding: 0.5rem 1rem;
border-collapse: separate;
border-spacing: 0.3rem 0.2rem;
width: auto;
"
>
<tr>
<td style="width: 9rem;"><b>No. RM</b></td>
<td class="data-colon">:</td>
<td><b>{{ .MedicalRecord }}</b></td>
</tr>
<tr>
<td><b>Nama</b></td>
<td class="data-colon">:</td>
<td><b>{{ .Name }}</b></td>
</tr>
<tr>
<td><b>Tanggal Lahir</b></td>
<td class="data-colon">:</td>
<td>{{ .BirthDate }}</td>
</tr>
</table>
<hr style="margin: 20px 0" />
<h1 style="
text-align: center;
font-weight: bold;
font-size: 1rem;
margin: 0;
">
FORM A
</h1>
<section>
<h4 class="section-title">Kajian Awal Medis:</i></h4>
<table style="margin-top: 0.3rem;">
{{ if gt (len .EarlyMedic) 0 }}
{{ range .EarlyMedic }}
<tr>
<td>
&#9745; {{ . }}
</td>
</tr>
{{ end }}
{{ else }}
<tr>
<td></td>
</tr>
{{ end }}
</table>
</section>
<section>
<h4 class="section-title">ASSESMEN:</h4>
<table style="margin-top: 0.3rem;">
<tr>
<td>
{{ .Assessment }}
</td>
</tr>
</table>
</section>
<section>
<h4 class="section-title">IDENTIFIKASI MASALAH:</h4>
<table style="margin-top: 0.3rem;">
{{ if gt (len .ProblemIdentification) 0 }}
{{ range .ProblemIdentification }}
<tr>
<td>
&#9745; {{ . }}
</td>
</tr>
{{ end }}
{{ else }}
<tr>
<td></td>
</tr>
{{ end }}
</table>
</section>
<section>
<h4 class="section-title">PERENCANAAN:</h4>
<table style="margin-top: 0.3rem;">
<tr>
<td>
{{ .Planning }}
</td>
</tr>
</table>
</section>
<table style="margin-top: 3rem;">
<tr>
<td></td>
<td style="text-align: center; width: 15rem;">
{{ .Date }}<br>
</td>
</tr>
<tr><td style="height: 7rem;"></td></tr>
<tr>
<td></td>
<td style="text-align: center; width: 15rem;">
({{ .Employee_Name }})
</td>
</tr>
</table>
<div style="height: 3rem;"></div>
</body>
</html>
+109
View File
@@ -0,0 +1,109 @@
<html>
<head>
<meta charset="UTF-8" />
<style>
body {
padding: 2rem 3rem;
}
table {
width: 100%;
border-collapse: collapse
}
td {
vertical-align: top;
}
.border-table,
.border-table td,
.border-table th {
border: 1px solid black;
}
.section-title {
margin-top: 1rem;
margin-bottom: 0rem;
}
.data-label {
width: 9rem;
}
.data-colon {
width: 0.1234rem;
}
</style>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.4">
<!-- Tanggal Terbit (top-right) -->
<div style="
text-align: right;
margin-right: 2rem;
font-size: 0.95rem;
margin-top: 0.5rem;
">
Tanggal Terbit : {{ .IssuedDate }}
</div>
<!-- Patient Info Box -->
<table
style="
margin-top: 1rem;
margin-left: auto;
margin-right: 2rem; /* space from right like example */
border: 1px solid #000;
padding: 0.5rem 1rem;
border-collapse: separate;
border-spacing: 0.3rem 0.2rem;
width: auto;
"
>
<tr>
<td style="width: 9rem;"><b>No. RM</b></td>
<td class="data-colon">:</td>
<td><b>{{ .MedicalRecord }}</b></td>
</tr>
<tr>
<td><b>Nama</b></td>
<td class="data-colon">:</td>
<td><b>{{ .Name }}</b></td>
</tr>
<tr>
<td><b>Tanggal Lahir</b></td>
<td class="data-colon">:</td>
<td>{{ .BirthDate }}</td>
</tr>
</table>
<table class="border-table"
style="margin-top: 1rem; width: 100%; table-layout: fixed;">
<tr>
<th style="width: 3rem; text-align:center;">NO</th>
<th style="width: 9rem; text-align:center;">Tanggal/jam</th>
<th style="width: auto;">
Implementasi, Monitoring, Fasilitasi, koordinasi, komunikasi dan kolaborasi,
advokasi, hasil pelayanan, Terminasi
</th>
<th style="width: 9rem; text-align:center;">MPP</th>
</tr>
{{ range .FormB }}
<tr>
<td style="text-align: center;">{{ .Number }}</td>
<td style="text-align: center;">{{ .Date }}</td>
<td style="white-space: normal; word-wrap: break-word;">
{{ .Value }}
</td>
<td style="text-align: center; white-space: normal;">
{{ .Employee_Name }}
</td>
</tr>
{{ end }}
</table>
<div style="height: 3rem;"></div>
</body>
</html>
+312
View File
@@ -0,0 +1,312 @@
<html>
<head>
<meta charset="UTF-8" />
<title>General Consent</title>
<style>
body {
padding: 2rem 3rem;
}
table {
width: 100%;
border-collapse: collapse
}
td {
vertical-align: top;
}
.border-table, .border-table td, .border-table th {
border: 1px solid black;
}
.section-title {
margin-top: 1rem;
margin-bottom: 0rem;
}
.data-label {
width: 9rem;
}
.data-colon {
width: 0.1234rem;
}
</style>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.4">
<table style="width: 100%; border-collapse: collapse">
<tr>
<td style="text-align: center">
<img src="logo-1.png" alt="logo" style="height: 70px" />
</td>
<td style="text-align: center">
<div style="font-size: 14px; font-weight: bold">
PEMERINTAH PROVINSI JAWA TIMUR
</div>
<div style="font-size: 14px; font-weight: bold">
RUMAH SAKIT UMUM DAERAH Dr. SAIFUL ANWAR
</div>
<div style="font-size: 13px">
TERAKREDITASI KARS VERSI 2012 TINGKAT PARIPURNA
</div>
<div style="margin-top: 8px">
Jl. Jaksa Agung Suprapto No. 2 MALANG 65111
</div>
<div>Telp. (0341) 362101, Fax. (0341) 362110</div>
<div>Email: rsu-drsaifulanwar@jatimprov.go.id</div>
<div>Website: www.rsudsaifulanwar.jatimprov.go.id</div>
</td>
<td style="text-align: center">
<img src="logo-rssa.png" alt="logo" style="height: 70px" />
</td>
</tr>
</table>
<hr style="margin: 20px 0" />
<div style="position: relative;">
<h1 style="
text-align: center;
font-weight: bold;
font-size: 1rem;
margin: 0;
">
Protokol Terapi
</h1>
<p style="
margin: 0;
text-align: center;
">Layanan Kedokteran Fisik dan Rehabilitasi
</p>
<div style="padding-inline: 0.5rem;text-align: center;border: 1px solid black;position: absolute;right: 0;top: 0;">
Terapi Ke <br><br>
{{ .Repalcable }}
</div>
</div>
<table class="border-table" style="margin-top: 2rem;">
<tr>
<td style="width: 7rem;">
No RM
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Nama Pasien
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Tanggal Lahir
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Diagnosa
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Permintaan Terapi
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Frekuensi Terapi
</td>
<td style="padding-left: 0.5rem;">
2 x Per Minggu &emsp; &emsp; &emsp;
Evaluasi: 1 Bulan
</td>
</tr>
<tr>
<td style="width: 7rem;">
Target Terapi
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Waktu Mencapai Target
</td>
<td>{{ .Repalcable }}</td>
</tr>
</table>
<table class="border-table" style="margin-top: 1rem;">
<tr>
<th style="width: 2rem;">
NO
</th>
<th>
Tanggal
</th>
<th>
Dokter
</th>
<th>
Fisioterapi
</th>
<th>
Terapi Wicara
</th>
<th>
Okupansi Terapi
</th>
<th>
Ortotik Prostetik
</th>
<th>
PSM
</th>
<th>
TTD Pasien
</th>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
1
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
2
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
3
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
4
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
5
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
6
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
7
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 3rem;text-align: center;">
8
</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td>
</tr>
</table>
<table class="border-table" style="margin-top: 1rem;">
<tr>
<td style="height: 2rem;width: 7rem;">
Evaluasi
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Rencana Selanjutnya
</td>
<td>{{ .Repalcable }}</td>
</tr>
</table>
<table style="margin-top: 2rem;">
<tr>
<td></td>
<td style="width: 15rem;">
Malang,<br>
Cap dan TTD Dr. SpKFR
</td>
</tr>
<tr><td style="height: 6rem;"></td></tr>
<tr>
<td></td>
<td style="height: 10rem;width: 15rem;">
(........................................................)
</td>
</tr>
</table>
<div style="height: 3rem;"></div>
</body>
</html>
+217
View File
@@ -0,0 +1,217 @@
<html>
<head>
<meta charset="UTF-8" />
<title>General Consent</title>
<style>
body {
padding: 2rem 3rem;
}
table {
width: 100%;
border-collapse: collapse
}
td {
vertical-align: top;
}
.border-table, .border-table td, .border-table th {
border: 1px solid black;
}
.section-title {
margin-top: 1rem;
margin-bottom: 0rem;
}
.data-label {
width: 9rem;
}
.data-colon {
width: 0.1234rem;
}
</style>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.4">
<table style="width: 100%; border-collapse: collapse">
<tr>
<td style="text-align: center">
<img src="logo-1.png" alt="logo" style="height: 70px" />
</td>
<td style="text-align: center">
<div style="font-size: 14px; font-weight: bold">
PEMERINTAH PROVINSI JAWA TIMUR
</div>
<div style="font-size: 14px; font-weight: bold">
RUMAH SAKIT UMUM DAERAH Dr. SAIFUL ANWAR
</div>
<div style="font-size: 13px">
TERAKREDITASI KARS VERSI 2012 TINGKAT PARIPURNA
</div>
<div style="margin-top: 8px">
Jl. Jaksa Agung Suprapto No. 2 MALANG 65111
</div>
<div>Telp. (0341) 362101, Fax. (0341) 362110</div>
<div>Email: rsu-drsaifulanwar@jatimprov.go.id</div>
<div>Website: www.rsudsaifulanwar.jatimprov.go.id</div>
</td>
</tr>
</table>
<hr style="margin: 20px 0" />
<table class="border-table" style="margin-top: 1rem;">
<tr>
<td style="width: 7rem;">
No RM:
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Nama Pasien
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;">
Diagnosa
</td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="width: 7rem;min-height: 6rem;">
Permintaan Terapi
</td>
<td>{{ .Repalcable }}</td>
</tr>
</table>
<table class="border-table" style="margin-top: 1rem;">
<tr>
<th rowspan="2" style="width: 17rem;">
PELAKSANAAN PROGRAM
</th>
<th rowspan="2">
Tanggal
</th>
<th colspan="3">
TTD
</th>
</tr>
<tr>
<th>
PASIEN
</th>
<th>
DOKTER
</th>
<th>
TERAPIS
</th>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">1. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">2. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">3. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">4. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">5. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">6. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">7. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">8. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">9. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">10. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">11. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">12. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">13. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">14. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">15. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">16. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">17. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">18. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">19. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
<tr>
<td style="height: 2rem;padding-left: 0.5rem;">20. {{ .Repalcable }}</td>
<td>{{ .Repalcable }}</td><td></td><td></td><td></td>
</tr>
</table>
<table style="margin-top: 2rem;">
<tr>
<td></td>
<td style="width: 15rem;">
Tempat & Tanggal<br>
Cap dan TTD Dr. SpKFR
</td>
</tr>
<tr><td style="height: 6rem;"></td></tr>
<tr>
<td></td>
<td style="width: 15rem;">
(.................................................)
</td>
</tr>
</table>
<div style="height: 3rem;"></div>
</body>
</html>
+241
View File
@@ -0,0 +1,241 @@
<html>
<head>
<meta charset="UTF-8" />
<title>General Consent</title>
<style>
body {
padding: 2rem 3rem;
}
table {
width: 100%;
border-collapse: collapse
}
td {
vertical-align: top;
}
.border-table,
.border-table td,
.border-table th {
border: 1px solid black;
}
.section-title {
margin-top: 1rem;
margin-bottom: 0rem;
}
.data-label {
width: 9rem;
}
.data-colon {
width: 0.1234rem;
}
</style>
</head>
<body style="font-family: Arial, sans-serif; line-height: 1.4">
<table style="width: 100%; border-collapse: collapse">
<tr>
<td style="text-align: center">
<img src="logo-1.png" alt="logo" style="height: 70px" />
</td>
<td style="text-align: center">
<div style="font-size: 14px; font-weight: bold">
PEMERINTAH PROVINSI JAWA TIMUR
</div>
<div style="font-size: 14px; font-weight: bold">
RUMAH SAKIT UMUM DAERAH Dr. SAIFUL ANWAR
</div>
<div style="font-size: 13px">
TERAKREDITASI KARS VERSI 2012 TINGKAT PARIPURNA
</div>
<div style="margin-top: 8px">
Jl. Jaksa Agung Suprapto No. 2 MALANG 65111
</div>
<div>Telp. (0341) 362101, Fax. (0341) 362110</div>
<div>Email: rsu-drsaifulanwar@jatimprov.go.id</div>
<div>Website: www.rsudsaifulanwar.jatimprov.go.id</div>
</td>
</tr>
</table>
<hr style="margin: 20px 0" />
<div style="position: relative;">
<h1 style="
text-align: center;
font-weight: bold;
font-size: 1rem;
margin: 0;
">
Lembar Formulir Rawat Jalan <br> Layanan Kedokteran Fisik dan Rehabilitasi
</h1>
</div>
<div style="
margin-top: 1.5rem;
border: 1px solid black;
padding: 0.3rem;
">
<table style="margin-top: 0.3rem;margin-bottom: 0.3rem;">
<tr>
<td style="width: 19rem;"><b>I. Identitas Pasien</b></td>
<td style="width: 4rem;">No. RM</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td>
</tr>
</table>
<table>
<tr>
<td style="width: 10rem; height: 1.5rem;">
Nama Pasien
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td>
</tr>
<tr>
<td style="height: 1.5rem;">
Tanggal Lahir
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
<tr>
<td style="height: 1.5rem;">
Aalamat
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
<tr>
<td style="height: 1.5rem;">
Telp / HP
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
<tr>
<td style="height: 1.5rem;">
Hubungan dengan Tertanggung
</td>
<td class="data-colon">: </td>
<td>
&#9745; Suami / Istri
&emsp;&emsp;
&#9634; Anak
</td>
</tr>
</table>
</div>
<div style="
margin-top: 1.5rem;
border: 1px solid black;
padding: 0.3rem;
">
<table style="margin-top: 0.3rem;margin-bottom: 0.3rem;">
<tr>
<td style="width: 19rem;"><b>II. Diisi oleh Dokter SpKFR</b></td>
</tr>
</table>
<table>
<tr>
<td style="width: 14rem; height: 1.5rem;">
Tanggal Pelayanan
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Anamnesa
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Pemeriksaan Fisik dan Uji Fungsi
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Diagnosis Medis (ICD-10)
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Diagnosis Fungsi (ICD-10)
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Pemeriksaan Penunjang
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Tata Laksana KFR (ICD 9 CM)
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Anjuran
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Evaluasi
</td>
<td class="data-colon">: </td>
<td>{{ .Repalcable }}</td></tr>
</tr>
<tr>
<td style="height: 1.5rem;">
Suspek Penyakit Akibat Kerja
</td>
<td class="data-colon">: </td>
<td>
&#9745; Ya &emsp; ( {{ .Repalcable }} )
<br>
&#9634; Tidak
</td>
</tr>
</table>
</div>
<table style="margin-top: 2rem;">
<tr>
<td style="text-align: center;">
TTD Pasien
</td>
<td style="text-align: center;">
Tempat & Tanggal<br>
Cap dan TTD Dr. SpKFR
</td>
</tr>
<tr><td style="height: 6rem;"></td></tr>
<tr>
<td style="height: 10rem;text-align: center;">
(........................................................)
</td>
<td style="height: 10rem;text-align: center;">
(........................................................)
</td>
</tr>
</table>
<div style="height: 3rem;"></div>
</body>
</html>
+5 -3
View File
@@ -66,9 +66,11 @@ bpjsCfg:
baseUrl:
syncUrlCfg:
enable: false
host:
prefix: new-to-old
enable: false
targetHost:
prefix: new-to-old
source: old-app
secretKey: new-world-order!!
docsCfg:
path: ../../assets/docs/
@@ -0,0 +1,2 @@
-- Modify "Soapi" table
ALTER TABLE "public"."Soapi" ALTER COLUMN "TypeCode" TYPE character varying(15);
@@ -0,0 +1,101 @@
-- Modify "Consultation" table
ALTER TABLE "public"."Consultation" ALTER COLUMN "DstUnit_Code" TYPE character varying(20);
-- Modify "ControlLetter" table
ALTER TABLE "public"."ControlLetter" ALTER COLUMN "Unit_Code" TYPE character varying(20), ALTER COLUMN "Specialist_Code" TYPE character varying(20), ALTER COLUMN "Subspecialist_Code" TYPE character varying(20);
-- Modify "Encounter" table
ALTER TABLE "public"."Encounter" ALTER COLUMN "Specialist_Code" TYPE character varying(20), ALTER COLUMN "Subspecialist_Code" TYPE character varying(20), ALTER COLUMN "Unit_Code" TYPE character varying(20);
-- Modify "Chemo" table
ALTER TABLE "public"."Chemo" ALTER COLUMN "SrcUnit_Code" TYPE character varying(20);
-- Modify "Installation" table
ALTER TABLE "public"."Installation" ALTER COLUMN "Code" TYPE character varying(20);
-- Modify "InternalReference" table
ALTER TABLE "public"."InternalReference" ALTER COLUMN "Unit_Code" TYPE character varying(20);
-- Modify "PracticeSchedule" table
ALTER TABLE "public"."PracticeSchedule" ALTER COLUMN "Unit_Code" TYPE character varying(20);
-- Create "DevicePackage" table
CREATE TABLE "public"."DevicePackage" (
"Id" serial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Code" character varying(20) NOT NULL,
"Name" character varying(50) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_DevicePackage_Code" UNIQUE ("Code")
);
-- Create "DevicePackageItem" table
CREATE TABLE "public"."DevicePackageItem" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"DevicePackage_Code" character varying(20) NOT NULL,
"Device_Code" character varying(20) NOT NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_DevicePackageItem_Device" FOREIGN KEY ("Device_Code") REFERENCES "public"."Device" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_DevicePackageItem_DevicePackage" FOREIGN KEY ("DevicePackage_Code") REFERENCES "public"."DevicePackage" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "MaterialPackage" table
CREATE TABLE "public"."MaterialPackage" (
"Id" serial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Code" character varying(20) NOT NULL,
"Name" character varying(50) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_MaterialPackage_Code" UNIQUE ("Code")
);
-- Create "MaterialPackageItem" table
CREATE TABLE "public"."MaterialPackageItem" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"MaterialPackage_Code" character varying(20) NOT NULL,
"Material_Code" character varying(20) NOT NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_MaterialPackageItem_Material" FOREIGN KEY ("Material_Code") REFERENCES "public"."Material" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_MaterialPackageItem_MaterialPackage" FOREIGN KEY ("MaterialPackage_Code") REFERENCES "public"."MaterialPackage" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Modify "Infra" table
ALTER TABLE "public"."Infra" ALTER COLUMN "Code" TYPE character varying(20), ALTER COLUMN "InfraGroup_Code" TYPE character varying(20), ALTER COLUMN "Parent_Code" TYPE character varying(20);
-- Modify "Specialist" table
ALTER TABLE "public"."Specialist" ALTER COLUMN "Code" TYPE character varying(20), ALTER COLUMN "Unit_Code" TYPE character varying(20);
-- Modify "Subspecialist" table
ALTER TABLE "public"."Subspecialist" ALTER COLUMN "Code" TYPE character varying(20), ALTER COLUMN "Specialist_Code" TYPE character varying(20);
-- Modify "Unit" table
ALTER TABLE "public"."Unit" ALTER COLUMN "Code" TYPE character varying(20), ALTER COLUMN "Installation_Code" TYPE character varying(20);
-- Create "ProcedureRoom" table
CREATE TABLE "public"."ProcedureRoom" (
"Id" serial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Code" character varying(20) NULL,
"Infra_Code" character varying(20) NULL,
"Type_Code" character varying(10) NULL,
"Unit_Code" character varying(20) NULL,
"Specialist_Code" character varying(20) NULL,
"Subspecialist_Code" character varying(20) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_ProcedureRoom_Code" UNIQUE ("Code"),
CONSTRAINT "uni_ProcedureRoom_Infra_Code" UNIQUE ("Infra_Code"),
CONSTRAINT "fk_ProcedureRoom_Infra" FOREIGN KEY ("Infra_Code") REFERENCES "public"."Infra" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_ProcedureRoom_Specialist" FOREIGN KEY ("Specialist_Code") REFERENCES "public"."Specialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_ProcedureRoom_Subspecialist" FOREIGN KEY ("Subspecialist_Code") REFERENCES "public"."Subspecialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_ProcedureRoom_Unit" FOREIGN KEY ("Unit_Code") REFERENCES "public"."Unit" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "ProcedureRoomOrder" table
CREATE TABLE "public"."ProcedureRoomOrder" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Encounter_Id" bigint NULL,
"Infra_Code" character varying(20) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_ProcedureRoomOrder_ProcedureRoom" FOREIGN KEY ("Infra_Code") REFERENCES "public"."ProcedureRoom" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Drop "Room" table
DROP TABLE "public"."Room";
@@ -0,0 +1,2 @@
-- Modify "ProcedureRoomOrder" table
ALTER TABLE "public"."ProcedureRoomOrder" ADD COLUMN "MaterialPackage_Code" character varying(20) NULL, ADD CONSTRAINT "fk_ProcedureRoomOrder_MaterialPackage" FOREIGN KEY ("MaterialPackage_Code") REFERENCES "public"."MaterialPackage" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
@@ -0,0 +1,2 @@
-- Modify "ProcedureRoomOrder" table
ALTER TABLE "public"."ProcedureRoomOrder" ADD COLUMN "Status_Code" character varying(20) NULL;
@@ -0,0 +1,14 @@
-- Modify "MaterialPackageItem" table
ALTER TABLE "public"."MaterialPackageItem" ADD COLUMN "Count" integer NULL;
-- Create "ProcedureRoomOrderItem" table
CREATE TABLE "public"."ProcedureRoomOrderItem" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"ProcedureRoomOrder_Id" bigint NULL,
"ProcedureRoom_Code" character varying(20) NULL,
"Note" character varying(255) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_ProcedureRoomOrderItem_ProcedureRoom" FOREIGN KEY ("ProcedureRoom_Code") REFERENCES "public"."ProcedureRoom" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
@@ -0,0 +1,4 @@
-- Modify "ProcedureRoomOrder" table
ALTER TABLE "public"."ProcedureRoomOrder" DROP COLUMN "Infra_Code";
-- Modify "ProcedureRoomOrderItem" table
ALTER TABLE "public"."ProcedureRoomOrderItem" ADD CONSTRAINT "fk_ProcedureRoomOrderItem_ProcedureRoomOrder" FOREIGN KEY ("ProcedureRoomOrder_Id") REFERENCES "public"."ProcedureRoomOrder" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
@@ -0,0 +1,23 @@
-- Modify "Chemo" table
ALTER TABLE "public"."Chemo" ADD COLUMN "Doctor_Code" character varying(20) NULL, ADD COLUMN "NextChemoDate" timestamptz NULL, ADD CONSTRAINT "fk_Chemo_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Rename a column from "Encounter_Id" to "Chemo_Id"
ALTER TABLE "public"."ChemoProtocol" RENAME COLUMN "Encounter_Id" TO "Chemo_Id";
-- Modify "ChemoProtocol" table
ALTER TABLE "public"."ChemoProtocol" DROP CONSTRAINT "fk_ChemoProtocol_Encounter", ALTER COLUMN "DurationUnit_Code" TYPE text, ADD COLUMN "Interval" bigint NULL, ADD COLUMN "Cycle" bigint NULL, ADD COLUMN "Series" integer NULL, ADD COLUMN "Status_Code" text NULL, ADD CONSTRAINT "fk_ChemoProtocol_Chemo" FOREIGN KEY ("Chemo_Id") REFERENCES "public"."Chemo" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Create "ChemoPlan" table
CREATE TABLE "public"."ChemoPlan" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Parent_Id" bigint NULL,
"Protocol_Id" bigint NULL,
"SeriesNumber" integer NULL,
"CycleNumber" bigint NULL,
"PlanDate" timestamptz NULL,
"RealizationDate" timestamptz NULL,
"Notes" text NULL,
"Status" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_ChemoPlan_Protocol" FOREIGN KEY ("Protocol_Id") REFERENCES "public"."ChemoProtocol" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
@@ -0,0 +1,2 @@
-- Modify "ChemoPlan" table
ALTER TABLE "public"."ChemoPlan" DROP CONSTRAINT "fk_ChemoPlan_Protocol", ADD CONSTRAINT "fk_ChemoProtocol_ChemoPlans" FOREIGN KEY ("Protocol_Id") REFERENCES "public"."ChemoProtocol" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
@@ -0,0 +1,2 @@
-- Modify "ChemoProtocol" table
ALTER TABLE "public"."ChemoProtocol" ADD COLUMN "Patient_Id" bigint NULL;
@@ -0,0 +1,2 @@
-- Modify "ChemoProtocol" table
ALTER TABLE "public"."ChemoProtocol" ADD COLUMN "VerifiedAt" timestamptz NULL, ADD COLUMN "VerifiedBy_User_Id" bigint NULL, ADD CONSTRAINT "fk_ChemoProtocol_VerifiedBy" FOREIGN KEY ("VerifiedBy_User_Id") REFERENCES "public"."User" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
@@ -0,0 +1,26 @@
-- Create "ProcedureReport" table
CREATE TABLE "public"."ProcedureReport" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Encounter_Id" bigint NULL,
"Date" timestamptz NOT NULL,
"Doctor_Code" character varying(10) NULL,
"Operator_Name" text NULL,
"Assistant_Name" text NULL,
"Instrumentor_Name" text NULL,
"Diagnose" character varying(1024) NULL,
"Nurse_Name" character varying(10) NULL,
"Anesthesia_Doctor_Code" character varying(10) NULL,
"Anesthesia_Nurse_Name" text NULL,
"ProcedureValue" text NULL,
"ExecutionValue" text NULL,
"Type_Code" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_ProcedureReport_Anesthesia_Doctor" FOREIGN KEY ("Anesthesia_Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_ProcedureReport_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_ProcedureReport_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Drop "ActionReport" table
DROP TABLE "public"."ActionReport";
@@ -0,0 +1,22 @@
-- Create "ApMcuOrder" table
CREATE TABLE "public"."ApMcuOrder" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"McuOrder_Id" smallint NULL,
"Substances" text NULL,
"Fictations" text NULL,
"Localization" text NULL,
"ClinicalDiagnoses" text NULL,
"Stadium" text NULL,
"ClinicalNotes" text NULL,
"PastHistory" text NULL,
"CurrentHistory" text NULL,
"PrevApMcu" text NULL,
"PrevApMcuNotes" text NULL,
"SupportingExams" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_ApMcuOrder_McuOrder_Id" UNIQUE ("McuOrder_Id"),
CONSTRAINT "fk_ApMcuOrder_McuOrder" FOREIGN KEY ("McuOrder_Id") REFERENCES "public"."McuOrder" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
@@ -0,0 +1,99 @@
-- Modify "ApMcuOrder" table
ALTER TABLE "public"."ApMcuOrder" DROP COLUMN "McuOrder_Id", ADD COLUMN "Encounter_Id" bigint NULL, ADD COLUMN "Number" bigint NULL, ADD COLUMN "Doctor_Code" character varying(20) NULL, ADD CONSTRAINT "uni_ApMcuOrder_Doctor_Code" UNIQUE ("Doctor_Code"), ADD CONSTRAINT "fk_ApMcuOrder_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ApMcuOrder_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Create "CpMcuOrder" table
CREATE TABLE "public"."CpMcuOrder" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Encounter_Id" bigint NULL,
"Number" bigint NULL,
"Doctor_Code" character varying(20) NULL,
"UrgencyLevel_Code" character varying(15) NOT NULL,
"OtherNotes" text NULL,
"ExamScheduleDate" timestamptz NULL,
"Resume" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_CpMcuOrder_Doctor_Code" UNIQUE ("Doctor_Code"),
CONSTRAINT "fk_CpMcuOrder_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_CpMcuOrder_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "CpMcuOrderItem" table
CREATE TABLE "public"."CpMcuOrderItem" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"CpMcuOrder_Id" bigint NULL,
"McuSrc_Code" character varying(20) NULL,
"Note" character varying(1024) NULL,
"Result" text NULL,
"Status_Code" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_CpMcuOrderItem_CpMcuOrder" FOREIGN KEY ("CpMcuOrder_Id") REFERENCES "public"."CpMcuOrder" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_CpMcuOrderItem_McuSrc" FOREIGN KEY ("McuSrc_Code") REFERENCES "public"."McuSrc" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "MicroMcuOrder" table
CREATE TABLE "public"."MicroMcuOrder" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Encounter_Id" bigint NULL,
"Number" bigint NULL,
"Doctor_Code" character varying(20) NULL,
"Stage_Code" character varying(10) NOT NULL,
"AxillaryTemp" numeric NULL,
"OtherNotes" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_MicroMcuOrder_Doctor_Code" UNIQUE ("Doctor_Code"),
CONSTRAINT "fk_MicroMcuOrder_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_MicroMcuOrder_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "MicroMcuOrderItem" table
CREATE TABLE "public"."MicroMcuOrderItem" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"MicroMcuOrder_Id" bigint NULL,
"McuSrc_Code" character varying(20) NULL,
"Note" character varying(1024) NULL,
"Result" text NULL,
"Status_Code" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_MicroMcuOrderItem_McuSrc" FOREIGN KEY ("McuSrc_Code") REFERENCES "public"."McuSrc" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_MicroMcuOrderItem_MicroMcuOrder" FOREIGN KEY ("MicroMcuOrder_Id") REFERENCES "public"."MicroMcuOrder" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "RadiologyMcuOrder" table
CREATE TABLE "public"."RadiologyMcuOrder" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Encounter_Id" bigint NULL,
"Number" bigint NULL,
"Doctor_Code" character varying(20) NULL,
"ClinicalNotes" text NULL,
"OtherNotes" text NULL,
"Resume" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_RadiologyMcuOrder_Doctor_Code" UNIQUE ("Doctor_Code"),
CONSTRAINT "fk_RadiologyMcuOrder_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_RadiologyMcuOrder_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Create "RadiologyMcuOrderItem" table
CREATE TABLE "public"."RadiologyMcuOrderItem" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"RadiologyMcuOrder_Id" bigint NULL,
"McuSrc_Code" character varying(20) NULL,
"Note" character varying(1024) NULL,
"Result" text NULL,
"Status_Code" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_RadiologyMcuOrderItem_McuSrc" FOREIGN KEY ("McuSrc_Code") REFERENCES "public"."McuSrc" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_RadiologyMcuOrderItem_RadiologyMcuOrder" FOREIGN KEY ("RadiologyMcuOrder_Id") REFERENCES "public"."RadiologyMcuOrder" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);
@@ -0,0 +1,8 @@
-- Modify "ApMcuOrder" table
ALTER TABLE "public"."ApMcuOrder" ADD COLUMN "Status_Code" character varying(10) NOT NULL;
-- Modify "CpMcuOrder" table
ALTER TABLE "public"."CpMcuOrder" ADD COLUMN "Status_Code" character varying(10) NOT NULL;
-- Modify "MicroMcuOrder" table
ALTER TABLE "public"."MicroMcuOrder" ADD COLUMN "Status_Code" character varying(10) NOT NULL;
-- Modify "RadiologyMcuOrder" table
ALTER TABLE "public"."RadiologyMcuOrder" ADD COLUMN "Status_Code" character varying(10) NOT NULL;
@@ -0,0 +1,2 @@
-- Modify "ChemoPlan" table
ALTER TABLE "public"."ChemoPlan" ADD COLUMN "Encounter_Id" bigint NULL, ADD CONSTRAINT "fk_ChemoPlan_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
@@ -0,0 +1,2 @@
-- Modify "Chemo" table
ALTER TABLE "public"."Chemo" ADD COLUMN "Class_Code" text NULL;
@@ -0,0 +1,2 @@
-- Modify "ProcedureReport" table
ALTER TABLE "public"."ProcedureReport" ALTER COLUMN "Nurse_Name" TYPE text;
@@ -0,0 +1,2 @@
-- Modify "ChemoPlan" table
ALTER TABLE "public"."ChemoPlan" ADD COLUMN "Reasons" text NULL;
@@ -0,0 +1,12 @@
-- Create "Registration" table
CREATE TABLE "public"."Registration" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Employee_Id" bigint NULL,
"Installation_Code" character varying(20) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_Registration_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_Registration_Installation" FOREIGN KEY ("Installation_Code") REFERENCES "public"."Installation" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
@@ -0,0 +1,2 @@
-- Modify "Person" table
ALTER TABLE "public"."Person" ADD COLUMN "BirthPlace" text NULL;
@@ -0,0 +1,14 @@
-- Create "Registrator" table
CREATE TABLE "public"."Registrator" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Employee_Id" bigint NULL,
"Installation_Code" character varying(20) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_Registrator_Employee" FOREIGN KEY ("Employee_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION,
CONSTRAINT "fk_Registrator_Installation" FOREIGN KEY ("Installation_Code") REFERENCES "public"."Installation" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);
-- Drop "Registration" table
DROP TABLE "public"."Registration";
@@ -0,0 +1,2 @@
-- Modify "User" table
ALTER TABLE "public"."User" ALTER COLUMN "Name" TYPE character varying(50);
@@ -0,0 +1,36 @@
-- Modify "Specialist" table
ALTER TABLE "public"."Specialist" DROP COLUMN "Unit_Code";
-- Rename a column from "SrcUnit_Code" to "Specialist_Code"
ALTER TABLE "public"."Chemo" RENAME COLUMN "SrcUnit_Code" TO "Specialist_Code";
-- Modify "Chemo" table
ALTER TABLE "public"."Chemo" DROP CONSTRAINT "fk_Chemo_SrcUnit", ADD CONSTRAINT "fk_Chemo_Specialist" FOREIGN KEY ("Specialist_Code") REFERENCES "public"."Specialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Modify "Doctor" table
ALTER TABLE "public"."Doctor" DROP COLUMN "Unit_Code";
-- Rename a column from "DstUnit_Code" to "Specialist_Code"
ALTER TABLE "public"."Consultation" RENAME COLUMN "DstUnit_Code" TO "Specialist_Code";
-- Rename a column from "DstDoctor_Code" to "Doctor_Code"
ALTER TABLE "public"."Consultation" RENAME COLUMN "DstDoctor_Code" TO "Doctor_Code";
-- Modify "Consultation" table
ALTER TABLE "public"."Consultation" DROP CONSTRAINT "fk_Consultation_DstDoctor", DROP CONSTRAINT "fk_Consultation_DstUnit", ADD CONSTRAINT "fk_Consultation_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_Consultation_Specialist" FOREIGN KEY ("Specialist_Code") REFERENCES "public"."Specialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Rename a column from "Unit_Code" to "Specialist_Code"
ALTER TABLE "public"."InternalReference" RENAME COLUMN "Unit_Code" TO "Specialist_Code";
-- Modify "InternalReference" table
ALTER TABLE "public"."InternalReference" DROP CONSTRAINT "fk_InternalReference_Unit", ADD CONSTRAINT "fk_InternalReference_Specialist" FOREIGN KEY ("Specialist_Code") REFERENCES "public"."Specialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Rename a column from "Unit_Code" to "Specialist_Code"
ALTER TABLE "public"."Nurse" RENAME COLUMN "Unit_Code" TO "Specialist_Code";
-- Modify "Nurse" table
ALTER TABLE "public"."Nurse" DROP CONSTRAINT "fk_Nurse_Unit", ADD CONSTRAINT "fk_Nurse_Specialist" FOREIGN KEY ("Specialist_Code") REFERENCES "public"."Specialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Rename a column from "Unit_Code" to "Specialist_Code"
ALTER TABLE "public"."PracticeSchedule" RENAME COLUMN "Unit_Code" TO "Specialist_Code";
-- Modify "PracticeSchedule" table
ALTER TABLE "public"."PracticeSchedule" DROP CONSTRAINT "fk_PracticeSchedule_Unit", ADD CONSTRAINT "fk_PracticeSchedule_Specialist" FOREIGN KEY ("Specialist_Code") REFERENCES "public"."Specialist" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Modify "ControlLetter" table
ALTER TABLE "public"."ControlLetter" DROP COLUMN "Unit_Code";
-- Modify "Encounter" table
ALTER TABLE "public"."Encounter" DROP COLUMN "Unit_Code";
-- Modify "ProcedureRoom" table
ALTER TABLE "public"."ProcedureRoom" DROP COLUMN "Unit_Code";
-- Drop "UnitPosition" table
DROP TABLE "public"."UnitPosition";
-- Drop "Unit" table
DROP TABLE "public"."Unit";
@@ -0,0 +1,4 @@
-- Modify "Subspecialist" table
ALTER TABLE "public"."Subspecialist" ALTER COLUMN "Name" TYPE character varying(100);
-- Modify "Specialist" table
ALTER TABLE "public"."Specialist" ADD COLUMN "Installation_Code" character varying(20) NULL, ADD CONSTRAINT "fk_Specialist_Installation" FOREIGN KEY ("Installation_Code") REFERENCES "public"."Installation" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
+26 -2
View File
@@ -1,4 +1,4 @@
h1:Ha8JZHXBp6W+fzzWOIT8TuDGwBAPu7d/JQa4hxKMCRw=
h1:bNByj2VsHOaJEMfbX3xRNdLNTeYIVgInihZwRFfBUpc=
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
@@ -138,4 +138,28 @@ h1:Ha8JZHXBp6W+fzzWOIT8TuDGwBAPu7d/JQa4hxKMCRw=
20251201114751.sql h1:HM17diiPknfSHAmP+kJGP6GzToaPU9/NT+KQBpf3Jq0=
20251201114913.sql h1:gqucFgHFFLA6n/Rdz486cZH5xkaJuwefESLJMJLDue8=
20251202030445.sql h1:QWBVfTepT7DaXP5E0BYoxNM0JwKIQ2qIMXzI4kbz/qE=
20251202044430.sql h1:OC5NTh0Jf8NNLVTRIvNImPiaMqJfDWkksxWcKq3UjDE=
20251202044430.sql h1:4QZH9lz0GrQ9rzP1AJ+hJgGalNpp+8FCRckNK7xaTbU=
20251202064000.sql h1:/EN7sT1ol/91qW1aXWrzX+Mc3XOC/7f/LtfA0JRHpbg=
20251202130629.sql h1:9mvalqfhqGCdkcJepJDzHprU2xb0i5sYys1Htf62ioo=
20251202160848.sql h1:Kd2/TziKSMezrt4XgbjQcYvY/Lo9rX0qw7/Lz0/oyKk=
20251202180207.sql h1:IHmSMIO3ia+YV5GULixbdlV1joaUAWtnjQHPd8+HKiM=
20251202231005.sql h1:lua0KKoeBptSfs/6ehZE6Azo6YUlNkOJwGFyb1HQWkY=
20251203205052.sql h1:nk0VK2Uv4bHE3SBfHo/aevVZxtHzr7zAzvmMU8TCCtk=
20251205073858.sql h1:46qqXnArgJmzGE/WO7v7Ev8Jh7BudDiGbdANexq/5Dk=
20251205211957.sql h1:3fvtZ/mBWsTIXllXMFOuCLJsp4MivVP56dunehlU0yo=
20251205214433.sql h1:rn3++FEfX7ntcJcOmCEuOMnr27TZqH0KMGRppzFwFTc=
20251205221124.sql h1:CRruUvGZqlVDBmbQSVEl4wFm+uq30AurMMDI6sb8jxg=
20251206021053.sql h1:bpuEocu4lOhZ7oLuxd//22dzjfNgU2iaWEqSD1mVwoU=
20251207020537.sql h1:m6uh4NHVF3EKNTVMqOmuBSDFD9oCQk5mAwo05fT46G4=
20251207212015.sql h1:UPelYGTeUR6rm8mU8dfNzgRDEDun0UQ4tkgsaDljn30=
20251207221222.sql h1:bTfUCvCf2UPh+BA2IY2PHQafb9DwY9nhH5FRuMEHy+0=
20251209022744.sql h1:y5/PAiZH/fYCpDJpkQdNRJwWICHH2iNIwM1V+S1P6KA=
20251209025908.sql h1:p3kZA8kyEj+mQZSrdY3k2K1NojQzFJh/MlZJ0Oy6t/k=
20251209030538.sql h1:zltV6/Fu2zJW0/lVBl7MdnWuJcqNTUIRcqYYZ8Fi1wo=
20251209051742.sql h1:BBNSmWfkamWrcKdxWjPiBS9yJ8yyQQUQIj3kip53nuE=
20251209064304.sql h1:Xs73yQbuJvuQ0OnW1FAZpeytmUl/bGTlJFrwGOsTF4w=
20251209070128.sql h1:fPGE6xOV6uCiVOqnvwn2L/GsBbgp2wxgmZOhF3bSGGM=
20251209084929.sql h1:u4LPMvkGAH4RfGC2IlBTIm7T7paMHoBSvTQ0w5Br7d0=
20251210145148.sql h1:rejGrnTpaygxPv06v0vxMytF4rk1OJBXaw3ttSmidgc=
20251211101547.sql h1:+jT5yRCEsSRExzoawrqymS/I7lVfwUQQSgSzbxCxgRk=
20251211113942.sql h1:hRwiVZnXGzgUbqOk5TZ6ZHzGs1GebIFeIKkJNb+6+f0=
+9 -1
View File
@@ -34,4 +34,12 @@ langCfg:
corsCfg:
allowedOrigin:
allowedMethod: GET, POST, PUT, PATCH, DELETE, OPTIONS
allowedMethod: GET, POST, PUT, PATCH, DELETE, OPTIONS
syncPartnerCfg:
oldSource
oldSecretKey
oldHost
newSource
newSecretKey
newHost
+2 -2
View File
@@ -1,10 +1,10 @@
package main
import (
a "github.com/karincake/apem"
h "simrs-vx/internal/interface/simgos-sync-handler"
a "github.com/karincake/apem"
d "github.com/karincake/apem/db-gorm-pg"
l "github.com/karincake/apem/logger-zerolog"
@@ -0,0 +1,36 @@
-- Create "SoapiLink" table
CREATE TABLE "public"."SoapiLink" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Simx_Id" bigint NULL,
"Simgos_Id" bigint NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_SoapiLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_SoapiLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "SoapiSimgosLog" table
CREATE TABLE "public"."SoapiSimgosLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "SoapiSimxLog" table
CREATE TABLE "public"."SoapiSimxLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
@@ -0,0 +1,72 @@
-- Create "DoctorLink" table
CREATE TABLE "public"."DoctorLink" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Simx_Id" bigint NULL,
"Simgos_Id" bigint NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_DoctorLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_DoctorLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "DoctorSimgosLog" table
CREATE TABLE "public"."DoctorSimgosLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "DoctorSimxLog" table
CREATE TABLE "public"."DoctorSimxLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "NurseLink" table
CREATE TABLE "public"."NurseLink" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Simx_Id" bigint NULL,
"Simgos_Id" bigint NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_NurseLink_Simgos_Id" UNIQUE ("Simgos_Id"),
CONSTRAINT "uni_NurseLink_Simx_Id" UNIQUE ("Simx_Id")
);
-- Create "NurseSimgosLog" table
CREATE TABLE "public"."NurseSimgosLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
-- Create "NurseSimxLog" table
CREATE TABLE "public"."NurseSimxLog" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Value" text NULL,
"Date" timestamptz NULL,
"Status" text NULL,
"ErrMessage" text NULL,
PRIMARY KEY ("Id")
);
@@ -1,7 +1,9 @@
h1:UdPzQZ17yyNN9HVuyrFFHj5KjLj4m6/e7s9frkdpQVU=
h1:V6uRNFb6js/aPft2hebJMA8tI0YJc4BuZ7Rlp56FV00=
20251113035508.sql h1:rjDlu6yDdy5xv6nrCOr7NialrLSLT23pzduYNq29Hf0=
20251114071129.sql h1:Z0GQ5bJo3C+tplaWzxT8n3J9HLkEaVsRVp5nn7bmYow=
20251117041601.sql h1:l/RPG5mObqCSBjO4mzG+wTq2ieSycvlfOSz4czpUdWY=
20251118082246.sql h1:xLUwA+EvKWIg3X/TJvu7rqbtBzONiINfag5NJpMV29E=
20251118082915.sql h1:hP6FmUVFuADIN2cDg2Z1l7Wx7PQRb+IYQDvKD7J8VAM=
20251126115527.sql h1:+2bp2nWTTqaPpKKfy5ZYSr6b1nEUXFG3tIw4r3OEnAQ=
20251126115527.sql h1:Bvg+Y7k+h5s+/UaezUyJb7J7uzEJS7U5Z/RoCixcUtI=
20251201093443.sql h1:dyiD1WzU9D6RjGhF0AtGfGLEsG6yocuk3HbcZWt9ZRQ=
20251209083238.sql h1:GmnvITp+vr3sYlWmPxWVxMnjSIRI0QKmv9i202kRgp4=
@@ -81,8 +81,8 @@ type Mr struct {
}
type Provider struct {
Kode string `json:"kdProvider" json:"kode"` // API sometimes uses different keys
NmProvider string `json:"nmProvider" json:"nama"`
Kode string `son:"kode"`
NmProvider string `json:"nama"`
}
type Poli struct {
@@ -1,7 +1,13 @@
package vclaimsepcontrolletter
import (
"encoding/json"
"fmt"
"time"
ecore "simrs-vx/internal/domain/base-entities/core"
pu "simrs-vx/pkg/use-case-helper"
)
type CreateDto struct {
@@ -9,6 +15,7 @@ type CreateDto struct {
Number *string `json:"number" gorm:"unique;size:20"`
Value *string `json:"value"`
FileUrl *string `json:"fileUrl" gorm:"unique;size:1024"`
RequestPayload string `json:"requestPayload" validate:"maxLength=1024"`
}
type ReadListDto struct {
@@ -69,3 +76,49 @@ func ToResponseList(data []VclaimSepControlLetter) []ResponseDto {
}
return resp
}
func (c CreateDto) RequestPayloadIntoJson() ([]byte, error) {
payload := map[string]interface{}{}
err := json.Unmarshal([]byte(c.RequestPayload), &payload)
if err != nil {
return nil, err
}
return json.Marshal(payload)
}
type ResponseForPDF struct {
Number string `json:"noSuratKontrol"`
PlannedControlDate string `json:"tglRencanaKontrol"`
IssuedDate string `json:"tglTerbit"`
Doctor_Name string `json:"namaDokter"`
DstUnit_Name string `json:"namaPoliTujuan"`
ResponsibleDoctor_Name string `json:"namaDokterPembuat"`
VclaimSep VclaimSep `json:"sep"`
}
type VclaimSep struct {
VclaimMember VclaimMember `json:"peserta"`
Diagnose string `json:"diagnosa"`
Number string `json:"noSep"`
}
type VclaimMember struct {
CardNumber string `json:"noKartu"`
Name string `json:"nama"`
BirthDate string `json:"tglLahir"`
Gender string `json:"kelamin"`
}
func (v ResponseForPDF) GenerateNameWithGender() string {
gender := "Perempuan"
if v.VclaimSep.VclaimMember.Gender == "L" {
gender = "Laki-Laki"
}
return fmt.Sprintf("%s (%s)", v.VclaimSep.VclaimMember.Name, gender)
}
func (v ResponseForPDF) GenerateBirthDate() string {
t, _ := time.Parse("2006-01-02", v.VclaimSep.VclaimMember.BirthDate)
return pu.FormatIndonesianDate(t)
}
@@ -1,90 +0,0 @@
package actionreport
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/encounter"
"time"
pa "simrs-vx/internal/lib/auth"
)
type CreateDto struct {
Encounter_Id uint64 `json:"encounter_id" validate:"required"`
Date *time.Time `json:"date" validate:"required"`
Doctor_Code string `json:"doctor_code" validate:"required"`
Operator_Employe_Id uint `json:"operator_employe_id" validate:"required"`
Assistant_Employe_Id uint `json:"assistant_employe_id" validate:"required"`
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id" validate:"required"`
Diagnose *string `json:"diagnose"`
Nurse_Code string `json:"nurse_code" validate:"required"`
Value string `json:"value" validate:"required"`
pa.AuthInfo
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
Encounter_Id *uint `json:"encounter-id"`
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
}
type UpdateDto struct {
Id uint16 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint16 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.Main
Encounter_Id uint64 `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty"`
Date *time.Time `json:"date"`
Doctor_Code string `json:"doctor_code"`
Operator_Employe_Id uint `json:"operator_employe_id"`
Assistant_Employe_Id uint `json:"assistant_employe_id"`
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
Diagnose *string `json:"diagnose"`
Nurse_Code string `json:"nurse_code"`
Value *string `json:"value"`
}
func (d ActionReport) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Date: d.Date,
Doctor_Code: d.Doctor_Code,
Operator_Employe_Id: d.Operator_Employe_Id,
Assistant_Employe_Id: d.Assistant_Employe_Id,
Instrumentor_Employe_Id: d.Instrumentor_Employe_Id,
Nurse_Code: d.Nurse_Code,
Value: &d.Value,
}
resp.Main = d.Main
return resp
}
func ToResponseList(data []ActionReport) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -1,51 +0,0 @@
package actionreport
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
eem "simrs-vx/internal/domain/main-entities/employee"
ee "simrs-vx/internal/domain/main-entities/encounter"
en "simrs-vx/internal/domain/main-entities/nurse"
"time"
)
type ActionReport struct {
ecore.Main // adjust this according to the needs
Encounter_Id uint64 `json:"encounter_id" gorm:"foreignKey"`
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Date *time.Time `json:"date" gorm:"not null;size:20"`
Doctor_Code string `json:"doctor_code" gorm:"size:10"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Operator_Employe_Id uint `json:"operator_employe_id"`
Operator_Employe *eem.Employee `json:"operator_employe,omitempty" gorm:"foreignKey:Operator_Employe_Id;references:Id"`
Assistant_Employe_Id uint `json:"assistant_employe_id"`
Instrumentor_Employe_Id uint `json:"instrumentor_employe_id"`
Instrumentor_Employe *eem.Employee `json:"instrumentor_employe,omitempty" gorm:"foreignKey:Instrumentor_Employe_Id;references:Id"`
Diagnose *string `json:"diagnose" gorm:"size:1024"`
Nurse_Code string `json:"nurse_code" gorm:"size:10"`
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
Value string `json:"value"`
// SurgerySize_Code *string `json:"surgerySize_code" gorm:"size:10"`
// Billing_Code *string `json:"billing_code" gorm:"size:10"`
// SurgerySystem_Code *string `json:"surgerySystem_code" gorm:"size:10"`
// StartAt *string `json:"startAt" gorm:"size:20"`
// EndAt *string `json:"endAt" gorm:"size:20"`
// AnesthesiaStartAt *string `json:"anesthesiaStartAt" gorm:"size:20"`
// AnesthesiaEndAt *string `json:"anesthesiaEndAt" gorm:"size:20"`
// SurgeryType_Code *string `json:"surgeryType_code" gorm:"size:10"`
// SurgeryStage_Code *string `json:"surgeryStage_code" gorm:"size:10"`
// BornMortality_Code *string `json:"bornMortality_code" gorm:"size:10"`
// BornLocation_Code *string `json:"bornLocation_code" gorm:"size:10"`
// Weight *string `json:"weight" gorm:"size:10"`
// BornNotes *string `json:"bornNotes" gorm:"size:1024"`
// Description *string `json:"notes" gorm:"size:1024"`
// BleedingAmount *uint16 `json:"bleedingAmount" gorm:"size:10"`
// BloodInType_Code *string `json:"bloodInType_code" gorm:"size:10"`
// BloodInAmount *uint16 `json:"bloodInAmount" gorm:"size:10"`
// Brand *string `json:"brand" gorm:"size:100"`
// ImplantName *string `json:"implantName" gorm:"size:100"`
// ImplantRegisterNumber *string `json:"implantRegisterNumber" gorm:"size:100"`
// ImplantCompanionName *string `json:"implantCompanionName" gorm:"size:100"`
// SpecimentDest_Code *string `json:"specimentDest" gorm:"size:100"`
// TissueInfo *string `json:"tissueInfo" gorm:"size:100"`
}
@@ -0,0 +1,23 @@
package apmcuorder
type CreateDto struct {
Encounter_Id uint `json:"encounter_id"`
Number uint64 `json:"number"`
Doctor_Code string `json:"-"`
Substances string `json:"substances"`
Fictations string `json:"fictations"`
Localization string `json:"localization"`
ClinicalDiagnoses string `json:"clinicalDiagnoses"`
Stadium string `json:"stadium"`
ClinicalNotes string `json:"clinicalNotes"`
CurrentHistory string `json:"currentHistory"`
PastHistory string `json:"pastHistory"`
PrevApMcu string `json:"prevApMcu"`
PrevApMcuNotes string `json:"prevApMcuNotes"`
SupportingExams string `json:"supportingExams"`
}
type UpdateDto struct {
Id uint64 `json:"id"`
CreateDto
}
@@ -0,0 +1,25 @@
package apmcuorder
import (
ecore "simrs-vx/internal/domain/base-entities/core"
erc "simrs-vx/internal/domain/references/common"
)
type ApMcuOrder struct {
ecore.BigMain
Encounter_Id uint `json:"encounter_id"`
Number uint64 `json:"number"`
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
Substances string `json:"substances"`
Fictations string `json:"fictations"`
Localization string `json:"localization"`
ClinicalDiagnoses string `json:"clinicalDiagnoses"`
Stadium string `json:"stadium"`
ClinicalNotes *string `json:"clinicalNotes"`
CurrentHistory string `json:"currentHistory"`
PastHistory string `json:"pastHistory"`
PrevApMcu *string `json:"prevApMcu"`
PrevApMcuNotes *string `json:"prevApMcuNotes"`
SupportingExams *string `json:"supportingExams"`
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
}
@@ -0,0 +1,96 @@
package apmcuorder
import (
la "simrs-vx/internal/lib/auth"
ecore "simrs-vx/internal/domain/base-entities/core"
eamob "simrs-vx/internal/domain/main-entities/ap-mcu-order/base"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
)
type CreateDto struct {
eamob.CreateDto
la.AuthInfo
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Sort string `json:"sort"`
Pagination ecore.Pagination
}
type FilterDto struct {
McuOrder_Id string `json:"mcu-order-id"`
}
type ReadDetailDto struct {
Id uint64 `json:"id"`
}
type UpdateDto struct {
Id uint64 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint64 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.BigMain
Encounter_Id uint `json:"encounter_id"`
Encounter *ee.Encounter
Number uint64 `json:"number"`
Doctor_Code string `json:"doctor_code"`
Doctor *ed.Doctor
Substances string `json:"substances"`
Fictations string `json:"fictations"`
Localization string `json:"localization"`
ClinicalDiagnoses string `json:"clinicalDiagnoses"`
Stadium string `json:"stadium"`
ClinicalNotes *string `json:"clinicalNotes"`
PastHistory string `json:"pastHistory"`
CurrentHistory string `json:"currentHistory"`
PrevApMcu *string `json:"prevApMcu"`
PrevApMcuNotes *string `json:"prevApMcuNotes"`
SupportingExams *string `json:"supportingExams"`
}
func (d ApMcuOrder) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Number: d.Number,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
Substances: d.Substances,
Fictations: d.Fictations,
Localization: d.Localization,
ClinicalDiagnoses: d.ClinicalDiagnoses,
Stadium: d.Stadium,
ClinicalNotes: d.ClinicalNotes,
PastHistory: d.PastHistory,
CurrentHistory: d.CurrentHistory,
PrevApMcu: d.PrevApMcu,
PrevApMcuNotes: d.PrevApMcuNotes,
SupportingExams: d.SupportingExams,
}
resp.BigMain = d.BigMain
return resp
}
func ToResponseList(data []ApMcuOrder) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,26 @@
package apmcuorder
import (
eamob "simrs-vx/internal/domain/main-entities/ap-mcu-order/base"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
erc "simrs-vx/internal/domain/references/common"
)
type ApMcuOrder struct {
eamob.ApMcuOrder
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
}
func (d ApMcuOrder) IsNotNew() bool {
return d.Status_Code != erc.DSCNew
}
func (d ApMcuOrder) IsCompleted() bool {
return d.Status_Code == erc.DSCDone
}
func (d ApMcuOrder) IsSameDoctor(doctor_code *string) bool {
return d.Doctor_Code == *doctor_code
}
@@ -0,0 +1,87 @@
package chemo_plan
import (
// std
"time"
ere "simrs-vx/internal/domain/references/encounter"
// internal - domain - main-entities
ecore "simrs-vx/internal/domain/base-entities/core"
)
type CreateDto struct {
Parent_Id *uint `json:"parent_id"`
SeriesNumber *uint16 `json:"seriesNumber"`
CycleNumber *uint `json:"cycleNumber"`
PlanDate *time.Time `json:"planDate"`
RealizationDate *time.Time `json:"realizationDate"`
Notes *string `json:"notes"`
Status ere.StatusProtocolChemo `json:"status"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
Parent_Id *uint `json:"parent-id"`
Protocol_Id *uint `json:"protocol-id"`
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
Includes string `json:"includes"`
}
type UpdateDto struct {
Id uint16 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint16 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.Main
Parent_Id *uint `json:"parent_id"` // chemo.Id
Protocol_Id *uint `json:"protocol_id"`
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
PlanDate *time.Time `json:"planDate"`
RealizationDate *time.Time `json:"realizationDate"`
Notes *string `json:"notes"`
Status ere.StatusProtocolChemo `json:"status"`
Reasons *string `json:"reasons"`
}
func (d ChemoPlan) ToResponse() ResponseDto {
resp := ResponseDto{
Parent_Id: d.Parent_Id,
SeriesNumber: d.SeriesNumber,
CycleNumber: d.CycleNumber,
PlanDate: d.PlanDate,
RealizationDate: d.RealizationDate,
Notes: d.Notes,
Status: d.Status,
}
resp.Main = d.Main
return resp
}
func ToResponseList(data []ChemoPlan) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,25 @@
package chemo_plan
import (
ee "simrs-vx/internal/domain/main-entities/encounter"
"time"
ecore "simrs-vx/internal/domain/base-entities/core"
ere "simrs-vx/internal/domain/references/encounter"
)
type ChemoPlan struct {
ecore.Main
Parent_Id *uint `json:"parent_id"` // chemo.Id
Protocol_Id *uint `json:"protocol_id"`
SeriesNumber *uint16 `json:"seriesNumber"` // series ke -
CycleNumber *uint `json:"cycleNumber"` // cycle ke -
PlanDate *time.Time `json:"planDate"`
RealizationDate *time.Time `json:"realizationDate"`
Notes *string `json:"notes"`
Status ere.StatusProtocolChemo `json:"status"`
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Reasons *string `json:"reasons"` // json
}
@@ -9,18 +9,21 @@ import (
// internal - domain - main-entities
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/encounter"
ec "simrs-vx/internal/domain/main-entities/chemo"
)
type CreateDto struct {
Encounter_Id *uint `json:"encounter_id"`
Patient_Weight *float32 `json:"patient_weight"`
Patient_Height *float32 `json:"patient_height"`
Diagnoses *string `json:"diagnoses"`
Duration *uint `json:"duration"`
DurationUnit_Code *erc.TimeUnitCode `json:"durationUnit_code"`
StartDate *time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
Chemo_Id *uint `json:"chemo_id"`
Patient_Weight *float32 `json:"patient_weight"`
Patient_Height *float32 `json:"patient_height"`
Diagnoses *string `json:"diagnoses"`
Interval *uint `json:"interval"`
Cycle *uint `json:"cycle"`
Series *uint16 `json:"series"`
StartDate *time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
Status_Code erc.DataVerifiedCode `json:"-"`
}
type ReadListDto struct {
@@ -30,7 +33,7 @@ type ReadListDto struct {
}
type FilterDto struct {
Encounter_Id *uint `json:"encounter-id"`
Chemo_Id *uint `json:"chemo-id"`
}
type ReadDetailDto struct {
@@ -55,28 +58,32 @@ type MetaDto struct {
type ResponseDto struct {
ecore.Main
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty"`
Patient_Weight *float32 `json:"patient_weight"`
Patient_Height *float32 `json:"patient_height"`
Diagnoses *string `json:"diagnoses"`
Duration *uint `json:"duration"`
DurationUnit_Code *erc.TimeUnitCode `json:"durationUnit_code"`
StartDate *time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
Chemo_Id *uint `json:"chemo_id"`
Chemo *ec.Chemo `json:"chemo,omitempty"`
Patient_Weight *float32 `json:"patient_weight"`
Patient_Height *float32 `json:"patient_height"`
Diagnoses *string `json:"diagnoses"`
Interval *uint `json:"interval"`
Cycle *uint `json:"cycle"`
Series *uint16 `json:"series"`
StartDate *time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
Status_Code erc.DataVerifiedCode `json:"status_code"`
}
func (d ChemoProtocol) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Patient_Weight: d.Patient_Weight,
Patient_Height: d.Patient_Height,
Diagnoses: d.Diagnoses,
Duration: d.Duration,
DurationUnit_Code: d.DurationUnit_Code,
StartDate: d.StartDate,
EndDate: d.EndDate,
Chemo_Id: d.Chemo_Id,
Chemo: d.Chemo,
Patient_Weight: d.Patient_Weight,
Patient_Height: d.Patient_Height,
Diagnoses: d.Diagnoses,
Interval: d.Interval,
Cycle: d.Cycle,
Series: d.Series,
StartDate: d.StartDate,
EndDate: d.EndDate,
Status_Code: d.Status_Code,
}
resp.Main = d.Main
return resp
@@ -1,21 +1,34 @@
package chemo_protocol
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/encounter"
"simrs-vx/internal/domain/references/common"
"time"
ecore "simrs-vx/internal/domain/base-entities/core"
erc "simrs-vx/internal/domain/references/common"
ec "simrs-vx/internal/domain/main-entities/chemo"
ecp "simrs-vx/internal/domain/main-entities/chemo-plan"
eus "simrs-vx/internal/domain/main-entities/user"
)
type ChemoProtocol struct {
ecore.Main
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Patient_Weight *float32 `json:"patient_weight"`
Patient_Height *float32 `json:"patient_height"`
Diagnoses *string `json:"diagnoses"`
Duration *uint `json:"duration"`
DurationUnit_Code *common.TimeUnitCode `json:"durationUnit_code" gorm:"size:10"`
StartDate *time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
Chemo_Id *uint `json:"chemo_id"`
Chemo *ec.Chemo `json:"chemo,omitempty" gorm:"foreignKey:Chemo_Id;references:Id"`
Patient_Weight *float32 `json:"patient_weight"`
Patient_Height *float32 `json:"patient_height"`
Diagnoses *string `json:"diagnoses"`
Duration *uint `json:"duration"` // not used
DurationUnit_Code *erc.TimeUnitCode `json:"durationUnit_code"` // not used
Interval *uint `json:"interval"`
Cycle *uint `json:"cycle"` // total cycle
Series *uint16 `json:"series"` // total series
StartDate *time.Time `json:"startDate"`
EndDate *time.Time `json:"endDate"`
Status_Code erc.DataVerifiedCode `json:"status_code"`
VerifiedAt *time.Time `json:"verifiedAt"`
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
ChemoPlans *[]ecp.ChemoPlan `json:"chemoPlans,omitempty" gorm:"foreignKey:Protocol_Id;references:Id"`
Patient_Id *uint `json:"patient_id"`
}
+22 -14
View File
@@ -1,7 +1,8 @@
package chemo
import (
// std
ed "simrs-vx/internal/domain/main-entities/doctor"
es "simrs-vx/internal/domain/main-entities/specialist"
"time"
// internal - lib
@@ -13,14 +14,13 @@ import (
// internal - domain - main-entities
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/encounter"
eun "simrs-vx/internal/domain/main-entities/unit"
eus "simrs-vx/internal/domain/main-entities/user"
)
type CreateDto struct {
Encounter_Id *uint `json:"encounter_id"`
Status_Code erc.DataVerifiedCode `json:"status_code"`
SrcUnit_Code *string `json:"srcUnit_code"`
Encounter_Id *uint `json:"encounter_id"`
Status_Code erc.DataVerifiedCode `json:"status_code"`
Specialist_Code *string `json:"specialist_code"`
}
type ReadListDto struct {
@@ -33,7 +33,7 @@ type FilterDto struct {
Encounter_Id *uint `json:"encounter-id"`
Status_Code *erc.DataVerifiedCode `json:"status-code"`
VerifiedBy_User_Id *uint `json:"verifiedBy-user-id"`
SrcUnit_Code *string `json:"srcUnit-code"`
Specialist_Code *string `json:"specialist-code"`
}
type ReadDetailDto struct {
@@ -50,10 +50,12 @@ type DeleteDto struct {
}
type VerifyDto struct {
Id uint16 `json:"id"`
Status_Code erc.DataVerifiedCode `json:"status_code"`
Bed *string `json:"bed" validate:"required"`
Needs *string `json:"needs" validate:"required"`
Id uint16 `json:"id"`
Status_Code erc.DataVerifiedCode `json:"status_code"`
Bed *string `json:"bed"`
Needs *string `json:"needs"`
Doctor_Code *string `json:"doctor_code" validate:"required"`
NextChemoDate *time.Time `json:"nextChemoDate"`
pa.AuthInfo
}
@@ -72,8 +74,11 @@ type ResponseDto struct {
VerifiedAt *time.Time `json:"verifiedAt"`
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
VerifiedBy *eus.User `json:"verifiedBy,omitempty"`
SrcUnit_Code *string `json:"srcUnit_code"`
SrcUnit *eun.Unit `json:"srcUnit,omitempty"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty"`
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor,omitempty"`
NextChemoDate *time.Time `json:"nextChemoDate"`
}
func (d Chemo) ToResponse() ResponseDto {
@@ -84,8 +89,11 @@ func (d Chemo) ToResponse() ResponseDto {
VerifiedAt: d.VerifiedAt,
VerifiedBy_User_Id: d.VerifiedBy_User_Id,
VerifiedBy: d.VerifiedBy,
SrcUnit_Code: d.SrcUnit_Code,
SrcUnit: d.SrcUnit,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
NextChemoDate: d.NextChemoDate,
}
resp.Main = d.Main
return resp
+12 -6
View File
@@ -1,14 +1,16 @@
package chemo
import (
ere "simrs-vx/internal/domain/references/encounter"
"time"
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/encounter"
eun "simrs-vx/internal/domain/main-entities/unit"
eus "simrs-vx/internal/domain/main-entities/user"
erc "simrs-vx/internal/domain/references/common"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
es "simrs-vx/internal/domain/main-entities/specialist"
eus "simrs-vx/internal/domain/main-entities/user"
)
type Chemo struct {
@@ -19,8 +21,12 @@ type Chemo struct {
VerifiedAt *time.Time `json:"verifiedAt"`
VerifiedBy_User_Id *uint `json:"verifiedBy_user_id"`
VerifiedBy *eus.User `json:"verifiedBy,omitempty" gorm:"foreignKey:VerifiedBy_User_Id;references:Id"`
SrcUnit_Code *string `json:"src_unit_code"`
SrcUnit *eun.Unit `json:"src_unit,omitempty" gorm:"foreignKey:SrcUnit_Code;references:Code"`
Specialist_Code *string `json:"specialist_code"` // klinik asal
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
Bed *string `json:"bed" gorm:"size:1024"`
Needs *string `json:"needs" gorm:"size:2048"`
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor" gorm:"foreignKey:Doctor_Code;references:Code"`
NextChemoDate *time.Time `json:"nextChemoDate"`
Class_Code ere.ChemoClassCode `json:"class_code"`
}
@@ -13,14 +13,14 @@ import (
// internal - domain - main-entities
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
)
type CreateDto struct {
Encounter_Id *uint `json:"encounter_id"`
Date *time.Time `json:"date"`
Problem *string `json:"problem" validate:"maxLength=10240"`
DstUnit_Code *string `json:"dstUnit_code"`
Encounter_Id *uint `json:"encounter_id"`
Date *time.Time `json:"date"`
Problem *string `json:"problem" validate:"maxLength=10240"`
Specialist_Code *string `json:"dstSpecialist_code"`
}
type ReadListDto struct {
@@ -30,9 +30,9 @@ type ReadListDto struct {
}
type FilterDto struct {
Encounter_Id *uint `json:"encounter-id"`
DstUnit_Code *string `json:"dstUnit-code"`
DstDoctor_Code *string `json:"dstDoctor-code"`
Encounter_Id *uint `json:"encounter-id"`
Specialist_Code *string `json:"dstSpecialist-code"`
Doctor_Code *string `json:"doctor-code"`
}
type ReadDetailDto struct {
@@ -63,29 +63,29 @@ type MetaDto struct {
type ResponseDto struct {
ecore.Main
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty"`
Date *time.Time `json:"date"`
Problem *string `json:"problem"`
Solution *string `json:"solution"`
DstUnit_Code *string `json:"dstUnit_code"`
DstUnit *eu.Unit `json:"dstUnit,omitempty"`
DstDoctor_Code *string `json:"dstDoctor_code"`
DstDoctor *ed.Doctor `json:"dstDoctor,omitempty"`
RepliedAt *time.Time `json:"repliedAt"`
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty"`
Date *time.Time `json:"date"`
Problem *string `json:"problem"`
Solution *string `json:"solution"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty"`
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor,omitempty"`
RepliedAt *time.Time `json:"repliedAt"`
}
func (d Consultation) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Date: d.Date,
Problem: d.Problem,
Solution: d.Solution,
DstUnit_Code: d.DstUnit_Code,
DstUnit: d.DstUnit,
DstDoctor_Code: d.DstDoctor_Code,
DstDoctor: d.DstDoctor,
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Date: d.Date,
Problem: d.Problem,
Solution: d.Solution,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
}
resp.Main = d.Main
return resp
@@ -6,7 +6,7 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
)
type Consultation struct {
@@ -15,11 +15,11 @@ type Consultation struct {
Encounter *ee.Encounter `json:"encounter" gorm:"foreignKey:Encounter_Id;references:Id"`
Date *time.Time `json:"date"`
Problem *string `json:"case" gorm:"size:10240"`
Solution *string `json:"solution" gorm:"size:10240"`
DstUnit_Code *string `json:"dstUnit_code"`
DstUnit *eu.Unit `json:"dstUnit" gorm:"foreignKey:DstUnit_Code;references:Code"`
DstDoctor_Code *string `json:"dstDoctor_code"`
DstDoctor *ed.Doctor `json:"dstDoctor" gorm:"foreignKey:DstDoctor_Code;references:Code"`
RepliedAt *time.Time `json:"repliedAt"`
Problem *string `json:"case" gorm:"size:10240"`
Solution *string `json:"solution" gorm:"size:10240"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist" gorm:"foreignKey:Specialist_Code;references:Code"`
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor" gorm:"foreignKey:Doctor_Code;references:Code"`
RepliedAt *time.Time `json:"repliedAt"`
}
@@ -15,7 +15,6 @@ import (
ee "simrs-vx/internal/domain/main-entities/encounter"
es "simrs-vx/internal/domain/main-entities/specialist"
ess "simrs-vx/internal/domain/main-entities/subspecialist"
eu "simrs-vx/internal/domain/main-entities/unit"
)
type CreateDto struct {
@@ -66,8 +65,6 @@ type ResponseDto struct {
ecore.Main
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter,omitempty"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty"`
Subspecialist_Code *string `json:"subspecialist_code"`
@@ -81,8 +78,6 @@ func (d ControlLetter) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Unit_Code: d.Unit_Code,
Unit: d.Unit,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Subspecialist_Code: d.Subspecialist_Code,
@@ -8,15 +8,12 @@ import (
ee "simrs-vx/internal/domain/main-entities/encounter"
es "simrs-vx/internal/domain/main-entities/specialist"
ess "simrs-vx/internal/domain/main-entities/subspecialist"
eu "simrs-vx/internal/domain/main-entities/unit"
)
type ControlLetter struct {
ecore.Main // adjust this according to the needs
Encounter_Id *uint `json:"encounter_id"`
Encounter *ee.Encounter `json:"encounter" gorm:"foreignKey:Encounter_Id;references:Id"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit" gorm:"foreignKey:Unit_Code;references:Code"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist" gorm:"foreignKey:Specialist_Code;references:Code"`
Subspecialist_Code *string `json:"subspecialist_code"`
@@ -0,0 +1,6 @@
package cpmcuorderitem
type SubCreateDto struct {
McuSrc_Code string `json:"mcuSrc_code" validate:"required"`
Note string `json:"note"`
}
@@ -0,0 +1,17 @@
package cpmcuorderitem
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ems "simrs-vx/internal/domain/main-entities/mcu-src"
erc "simrs-vx/internal/domain/references/common"
)
type CpMcuOrderItem struct {
ecore.BigMain // adjust this according to the needs
CpMcuOrder_Id uint64 `json:"cpMcuOrder_id" gorm:"uniqueIndex:idx_order_src"`
McuSrc_Code string `json:"mcuSrc_code" gorm:"uniqueIndex:idx_order_src"`
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
Note *string `json:"note" gorm:"size:1024"`
Result *string `json:"result"`
Status_Code erc.DataStatusCode `json:"status_code"`
}
@@ -0,0 +1,80 @@
package cpmcuorderitem
import (
ecore "simrs-vx/internal/domain/base-entities/core"
emro "simrs-vx/internal/domain/main-entities/cp-mcu-order"
ems "simrs-vx/internal/domain/main-entities/mcu-src"
erc "simrs-vx/internal/domain/references/common"
"time"
)
type CreateDto struct {
CpMcuOrder_Id uint64 `json:"cpMcuOrder_id"`
McuSrc_Code string `json:"mcuSrc_code"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
CpMcuOrder_Id *uint64 `json:"cp-mcu-order-id"`
McuSrc_Code *string `json:"mcu-src-code"`
Status_Code erc.DataStatusCode `json:"status-code"`
}
type ReadDetailDto struct {
Id uint `json:"id"`
}
type UpdateDto struct {
Id uint `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint `json:"id"`
}
type SetScheduleDto struct {
Id uint `json:"id"`
ExaminationDate *time.Time `json:"examinationDate"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.BigMain
CpMcuOrder_Id uint64 `json:"cpMcuOrder_id"`
CpMcuOrder *emro.CpMcuOrder `json:"cpMcuOrder,omitempty"`
McuSrc_Code string `json:"mcuSrc_code"`
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
Result *string `json:"result"`
Status_Code erc.DataStatusCode `json:"status_code"`
}
func (d CpMcuOrderItem) ToResponse() ResponseDto {
resp := ResponseDto{
CpMcuOrder_Id: d.CpMcuOrder_Id,
CpMcuOrder: d.CpMcuOrder,
McuSrc_Code: d.McuSrc_Code,
McuSrc: d.McuSrc,
Result: d.Result,
Status_Code: d.Status_Code,
}
resp.BigMain = d.BigMain
return resp
}
func ToResponseList(data []CpMcuOrderItem) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,17 @@
package cpmcuorderitem
import (
emo "simrs-vx/internal/domain/main-entities/cp-mcu-order"
emoib "simrs-vx/internal/domain/main-entities/cp-mcu-order-item/base"
erc "simrs-vx/internal/domain/references/common"
)
type CpMcuOrderItem struct {
emoib.CpMcuOrderItem
CpMcuOrder *emo.CpMcuOrder `json:"cpMcuOrder,omitempty" gorm:"foreignKey:CpMcuOrder_Id;references:Id"`
}
func (d CpMcuOrderItem) IsCompleted() bool {
return d.Status_Code == erc.DSCDone
}
@@ -0,0 +1,21 @@
package cpmcuorder
import (
"time"
ecore "simrs-vx/internal/domain/base-entities/core"
ercl "simrs-vx/internal/domain/references/clinical"
erc "simrs-vx/internal/domain/references/common"
)
type CpMcuOrder struct {
ecore.BigMain
Encounter_Id uint `json:"encounter_id"`
Number uint64 `json:"number"`
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
UrgencyLevel_Code ercl.McuUrgencyLevelCode `json:"urgencyLevel_code" gorm:"not null;size:15"`
OtherNotes *string `json:"otherNotes"`
ExamScheduleDate *time.Time `json:"examinationDate"`
Resume *string `json:"resume"`
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
}
@@ -0,0 +1,84 @@
package cpmcuorder
import (
la "simrs-vx/internal/lib/auth"
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
)
type CreateDto struct {
Encounter_Id uint `json:"encounter_id" validate:"required"`
Number uint64 `json:"number"` // SHOULD BE AUTOMATIC WITHOUT SYNC
UrgencyLevel_Code string `json:"urgencyLevel_code" validate:"required"`
OtherNotes string `json:"otherNotes"`
la.AuthInfo
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Sort string `json:"sort"`
Pagination ecore.Pagination
}
type FilterDto struct {
Encounter_Id uint `json:"encounter-id"`
Doctor_Code string `json:"doctor-code"`
}
type ReadDetailDto struct {
Id uint64 `json:"id"`
Includes string `json:"includes"`
}
type UpdateDto struct {
Id uint64 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint64 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.BigMain
Encounter_Id uint
Encounter *ee.Encounter
Number uint64 `json:"number"`
Doctor_Code string `json:"doctor_code"`
Doctor *ed.Doctor
UrgencyLevel_Code string `json:"urgencyLevel_code" gorm:"not null;size:15"`
OtherNotes *string `json:"otherNotes"`
Resume *string `json:"resume"`
}
func (d CpMcuOrder) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Number: d.Number,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
UrgencyLevel_Code: string(d.UrgencyLevel_Code),
OtherNotes: d.OtherNotes,
Resume: d.Resume,
}
resp.BigMain = d.BigMain
return resp
}
func ToResponseList(data []CpMcuOrder) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,28 @@
package cpmcuorder
import (
ecmoi "simrs-vx/internal/domain/main-entities/cp-mcu-order-item/base"
eamob "simrs-vx/internal/domain/main-entities/cp-mcu-order/base"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
erc "simrs-vx/internal/domain/references/common"
)
type CpMcuOrder struct {
eamob.CpMcuOrder
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Items []*ecmoi.CpMcuOrderItem `json:"items" gorm:"foreignKey:CpMcuOrder_Id;references:Id"`
}
func (d CpMcuOrder) IsNotNew() bool {
return d.Status_Code != erc.DSCNew
}
func (d CpMcuOrder) IsCompleted() bool {
return d.Status_Code == erc.DSCDone
}
func (d CpMcuOrder) IsSameDoctor(doctor_code *string) bool {
return d.Doctor_Code == *doctor_code
}
@@ -0,0 +1,63 @@
package devicepackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type CreateDto struct {
Code string `json:"code" validate:"maxLength=20"`
Name string `json:"name" validate:"maxLength=50"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
Code string `json:"code"`
Name string `json:"name"`
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
}
type UpdateDto struct {
Id uint16 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint16 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.SmallMain
Code string `json:"code"`
Name string `json:"name"`
}
func (d DevicePackage) ToResponse() ResponseDto {
resp := ResponseDto{
Code: d.Code,
Name: d.Name,
}
resp.SmallMain = d.SmallMain
return resp
}
func ToResponseList(data []DevicePackage) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,11 @@
package devicepackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type DevicePackage struct {
ecore.SmallMain
Code string `json:"code" gorm:"unique;size:20;not null"`
Name string `json:"name" gorm:"size:50"`
}
@@ -0,0 +1,69 @@
package devicepackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/device"
edp "simrs-vx/internal/domain/main-entities/device-package"
)
type CreateDto struct {
DevicePackage_Code string `json:"devicePackage_code" validate:"maxLength=20"`
Device_Code string `json:"code" validate:"maxLength=20"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
DevicePackage_Code string `json:"devicePackage-code"`
Device_Code string `json:"code"`
}
type ReadDetailDto struct {
Id uint `json:"id"`
}
type UpdateDto struct {
Id uint `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.Main
DevicePackage_Code string `json:"devicePackage_code"`
DevicePackage *edp.DevicePackage `json:"devicePackage,omitempty"`
Device_Code string `json:"code"`
Device *ed.Device `json:"device,omitempty"`
}
func (d DevicePackageItem) ToResponse() ResponseDto {
resp := ResponseDto{
DevicePackage_Code: d.DevicePackage_Code,
DevicePackage: d.DevicePackage,
Device_Code: d.Device_Code,
Device: d.Device,
}
resp.Id = d.Id
return resp
}
func ToResponseList(data []DevicePackageItem) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,15 @@
package devicepackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/device"
edp "simrs-vx/internal/domain/main-entities/device-package"
)
type DevicePackageItem struct {
ecore.Main
DevicePackage_Code string `json:"devicePackage_code" gorm:"size:20;not null"`
DevicePackage *edp.DevicePackage `json:"devicePackage" gorm:"foreignKey:DevicePackage_Code;references:Code"`
Device_Code string `json:"code" gorm:"size:20;not null"`
Device *ed.Device `json:"device" gorm:"foreignKey:Device_Code;references:Code"`
}
@@ -0,0 +1,63 @@
package devicepackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type CreateDto struct {
Code string `json:"code" validate:"maxLength=20"`
Name string `json:"name" validate:"maxLength=50"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
Code string `json:"code"`
Name string `json:"name"`
}
type ReadDetailDto struct {
Id uint16 `json:"id"`
}
type UpdateDto struct {
Id uint16 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint16 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.SmallMain
Code string `json:"code"`
Name string `json:"name"`
}
func (d DevicePackage) ToResponse() ResponseDto {
resp := ResponseDto{
Code: d.Code,
Name: d.Name,
}
resp.SmallMain = d.SmallMain
return resp
}
func ToResponseList(data []DevicePackage) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,11 @@
package devicepackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type DevicePackage struct {
ecore.SmallMain
Code string `json:"code" gorm:"unique;size:20;not null"`
Name string `json:"name" gorm:"size:50"`
}
@@ -5,7 +5,6 @@ import (
ee "simrs-vx/internal/domain/main-entities/employee"
es "simrs-vx/internal/domain/main-entities/specialist"
ess "simrs-vx/internal/domain/main-entities/subspecialist"
eu "simrs-vx/internal/domain/main-entities/unit"
"time"
)
@@ -69,8 +68,6 @@ type ResponseDto struct {
Employee *ee.Employee `json:"employee,omitempty"`
IHS_Number *string `json:"ihs_number"`
SIP_Number *string `json:"sip_number"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty" `
Subspecialist_Code *string `json:"subspecialist_code"`
@@ -84,8 +81,6 @@ func (d Doctor) ToResponse() ResponseDto {
Employee: d.Employee,
IHS_Number: d.IHS_Number,
SIP_Number: d.SIP_Number,
Unit_Code: d.Unit_Code,
Unit: d.Unit,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Subspecialist_Code: d.Subspecialist_Code,
@@ -5,7 +5,6 @@ import (
ee "simrs-vx/internal/domain/main-entities/employee"
es "simrs-vx/internal/domain/main-entities/specialist"
ess "simrs-vx/internal/domain/main-entities/subspecialist"
eu "simrs-vx/internal/domain/main-entities/unit"
"time"
)
@@ -17,8 +16,6 @@ type Doctor struct {
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
SIP_Number *string `json:"sip_number" gorm:"unique;size:20"`
SIP_ExpiredDate *time.Time `json:"sip_expiredDate"`
Unit_Code *string `json:"unit_code" gorm:"size:10"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
Specialist_Code *string `json:"specialist_code" gorm:"size:10"`
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
Subspecialist_Code *string `json:"subspecialist_code" gorm:"size:10"`
+47 -32
View File
@@ -30,32 +30,41 @@ import (
er "simrs-vx/internal/domain/main-entities/rehab/base"
es "simrs-vx/internal/domain/main-entities/specialist"
ess "simrs-vx/internal/domain/main-entities/subspecialist"
eu "simrs-vx/internal/domain/main-entities/unit"
)
type CreateDto struct {
Patient_Id *uint `json:"patient_id"`
RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
SubClass_Code *string `json:"subClass_code" validate:"maxLength=10"` // for sub
Infra_Code *string `json:"infra_code"` // for inpatient
Unit_Code *string `json:"unit_code"`
Specialist_Code *string `json:"specialist_code"`
Subspecialist_Code *string `json:"subspecialist_code"`
VisitDate time.Time `json:"visitDate"`
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
Member_Number *string `json:"member_number" validate:"maxLength=20"`
Ref_Number *string `json:"ref_number" validate:"maxLength=20"`
Trx_Number *string `json:"trx_number" validate:"maxLength=20"`
Appointment_Doctor_Code *string `json:"appointment_doctor_code"`
Adm_Employee_Id *uint `json:"-"`
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
Appointment_Id *uint `json:"appointment_id"`
RefTypeCode ere.RefTypeCode `json:"refTypeCode"`
NewStatus bool `json:"newStatus"`
VclaimReference *TRujukan `json:"vclaimReference"`
Patient_Id *uint `json:"patient_id"`
RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class_code" validate:"maxLength=10"`
SubClass_Code *string `json:"subClass_code" validate:"maxLength=10"` // for sub
Infra_Code *string `json:"infra_code"` // for inpatient
Specialist_Code *string `json:"specialist_code"`
Subspecialist_Code *string `json:"subspecialist_code"`
VisitDate time.Time `json:"visitDate"`
StartedAt *time.Time `json:"startedAt"`
FinishedAt *time.Time `json:"finishedAt"`
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
Member_Number *string `json:"member_number" validate:"maxLength=20"`
RefTypeCode ere.RefTypeCode `json:"refTypeCode"`
Ref_Number *string `json:"ref_number" validate:"maxLength=20"`
Trx_Number *string `json:"trx_number" validate:"maxLength=20"`
Appointment_Doctor_Code *string `json:"appointment_doctor_code"`
Adm_Employee_Id *uint `json:"-"`
Responsible_Doctor_Code *string `json:"responsible_doctor_code"`
Responsible_Nurse_Code *string `json:"responsible_nurse_code"`
Discharge_Method_Code *ere.DischargeMethodCode `json:"discharge_method_code" gorm:"size:16"`
RefSource_Name *string `json:"refSource_name" validate:"maxLength=100"`
Appointment_Id *uint `json:"appointment_id"`
EarlyEducation *string `json:"earlyEducation"`
MedicalDischargeEducation *string `json:"medicalDischargeEducation"`
AdmDischargeEducation *string `json:"admDischargeEducation"`
DischargeReason *string `json:"dischargeReason"`
Status_Code erc.DataStatusCode `json:"status_code" gorm:"size:10"`
Discharge_Date *time.Time `json:"discharge_date"`
DeathCause *edc.DeathCause `json:"deathCause"`
NewStatus bool `json:"newStatus"`
VclaimReference *TRujukan `json:"vclaimReference"`
Id uint `json:"-"`
RecentEncounterAdm *Encounter `json:"-"` // if subClass_Code is rehab
@@ -78,8 +87,14 @@ type TRujukan struct {
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
Includes string `json:"includes"`
Pagination ecore.Pagination
Patient_Identifier *string `json:"patient-identifier"`
StartDate *string `json:"start-date"`
EndDate *string `json:"end-date"`
PaymentMethod_Code *string `json:"paymentMethod-code"`
Status_Code *string `json:"status-code"`
Specialist_Code *string `json:"specialist-code"`
pa.AuthInfo
}
@@ -89,7 +104,6 @@ type FilterDto struct {
Patient *ep.Patient `json:"patient,omitempty"`
RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class-code" validate:"maxLength=10"`
Unit_Code *string `json:"unit-code"`
Specialist_Code *string `json:"specialist-code"`
Subspecialist_Code *string `json:"subspecialist-code"`
VisitDate time.Time `json:"visitDate"`
@@ -154,7 +168,7 @@ type CheckinDto struct {
pa.AuthInfo
}
type SwitchUnitDto struct {
type SwitchSpecialistDto struct {
Id uint `json:"id"`
PolySwitchCode *ere.PolySwitchCode `json:"polySwitchCode"`
InternalReferences *[]eir.CreateDto `json:"internalReferences" validate:"required"`
@@ -164,7 +178,7 @@ type SwitchUnitDto struct {
pa.AuthInfo
}
type ApproveCancelUnitDto struct {
type ApproveCancelSpecialistDto struct {
Id uint `json:"id"`
InternalReferences_Id uint `json:"internalReferences_id" validate:"required"`
Dst_Doctor_Code *string `json:"dst_doctor_code"`
@@ -178,12 +192,10 @@ type ResponseDto struct {
Patient *ep.Patient `json:"patient,omitempty"`
RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class_code"`
Unit_Code *string `json:"unit_code"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty"`
Subspecialist_Code *string `json:"subspecialist_code"`
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty"`
Unit *eu.Unit `json:"unit,omitempty"`
VisitDate time.Time `json:"visitDate"`
PaymentMethod_Code ere.AllPaymentMethodCode `json:"paymentMethod_code"`
InsuranceCompany_Code *string `json:"insuranceCompany_code"`
@@ -228,8 +240,6 @@ func (d Encounter) ToResponse() ResponseDto {
Patient: d.Patient,
RegisteredAt: d.RegisteredAt,
Class_Code: d.Class_Code,
Unit_Code: d.Unit_Code,
Unit: d.Unit,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Subspecialist_Code: d.Subspecialist_Code,
@@ -281,3 +291,8 @@ func ToResponseList(data []Encounter) []ResponseDto {
}
return resp
}
type CreateWithPatientDto struct {
Encounter CreateDto `json:"encounter"`
Patient ep.CreateDto `json:"patient"`
}
@@ -25,7 +25,6 @@ import (
er "simrs-vx/internal/domain/main-entities/rehab/base"
es "simrs-vx/internal/domain/main-entities/specialist"
ess "simrs-vx/internal/domain/main-entities/subspecialist"
eu "simrs-vx/internal/domain/main-entities/unit"
)
type Encounter struct {
@@ -34,8 +33,6 @@ type Encounter struct {
Patient *ep.Patient `json:"patient,omitempty" gorm:"foreignKey:Patient_Id;references:Id"`
RegisteredAt *time.Time `json:"registeredAt"`
Class_Code ere.EncounterClassCode `json:"class_code" gorm:"not null;size:10"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
Subspecialist_Code *string `json:"subspecialist_code"`
+10 -9
View File
@@ -3,15 +3,16 @@ package infra
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ei "simrs-vx/internal/domain/main-entities/item"
erb "simrs-vx/internal/domain/main-entities/room/base"
erb "simrs-vx/internal/domain/main-entities/procedure-room/base"
ero "simrs-vx/internal/domain/references/organization"
)
type CreateDto struct {
Code string `json:"code" validate:"maxLength=10"`
Code string `json:"code" validate:"maxLength=20"`
Name string `json:"name" validate:"maxLength=50"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" validate:"maxLength=15"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" validate:"maxLength=20"`
Parent_Code *string `json:"parent_code"`
Item_Code *string `json:"-"`
Unit_Code *string `json:"unit_code"`
@@ -31,7 +32,7 @@ type ReadListDto struct {
type FilterDto struct {
Code string `json:"code"`
Name string `json:"name"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup-code"`
InfraGroup_Code ero.InfraGroupCode `json:"infra-group-code"`
Parent_Code *string `json:"parent-code"`
Item_Id *string `json:"item-code"`
Search string `json:"search" gormhelper:"searchColumns=Code,Name"`
@@ -69,7 +70,7 @@ type ResponseDto struct {
Childrens []Infra `json:"childrens,omitempty"`
Item_Code *string `json:"item_code"`
Item *ei.Item `json:"item,omitempty"`
Rooms []erb.Basic `json:"rooms,omitempty"`
ProcedureRooms *erb.ProcedureRoom `json:"rooms,omitempty"`
}
func (d Infra) ToResponse() ResponseDto {
@@ -79,10 +80,10 @@ func (d Infra) ToResponse() ResponseDto {
InfraGroup_Code: d.InfraGroup_Code,
Parent_Code: d.Parent_Code,
// Parent: d.Parent,
Childrens: d.Childrens,
Item_Code: d.Item_Code,
Item: d.Item,
Rooms: d.Rooms,
Childrens: d.Childrens,
Item_Code: d.Item_Code,
Item: d.Item,
ProcedureRooms: d.ProcedureRooms,
}
resp.SmallMain = d.SmallMain
return resp
@@ -4,20 +4,20 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ei "simrs-vx/internal/domain/main-entities/item"
erb "simrs-vx/internal/domain/main-entities/room/base"
erb "simrs-vx/internal/domain/main-entities/procedure-room/base"
ero "simrs-vx/internal/domain/references/organization"
)
type Infra struct {
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"uniqueIndex;size:10;not null"`
Code string `json:"code" gorm:"uniqueIndex;size:20;not null"`
Name string `json:"name" gorm:"size:50"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:15"`
Parent_Code *string `json:"parent_code" gorm:"size:10"`
InfraGroup_Code ero.InfraGroupCode `json:"infraGroup_code" gorm:"size:20"`
Parent_Code *string `json:"parent_code" gorm:"size:20"`
Parent *Infra `json:"parent" gorm:"foreignKey:Parent_Code;references:Code"`
Childrens []Infra `json:"childrens" gorm:"foreignKey:Parent_Code;references:Code"`
Item_Code *string `json:"item_code" gorm:"size:50"`
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Code;references:Code"`
Rooms []erb.Basic `json:"rooms" gorm:"foreignKey:Infra_Code;references:Code"`
ProcedureRooms *erb.ProcedureRoom `json:"rooms" gorm:"foreignKey:Infra_Code;references:Code"`
}
@@ -9,9 +9,9 @@ import (
type CreateDto struct {
Id *uint `json:"id"`
Code *string `json:"code" validate:"maxLength=10"`
Code *string `json:"code" validate:"maxLength=20"`
Name string `json:"name" validate:"maxLength=50"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" validate:"maxLength=10"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" validate:"maxLength=20"`
}
type ReadListDto struct {
@@ -8,7 +8,7 @@ import (
type Installation struct {
ecore.SmallMain // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Code string `json:"code" gorm:"unique;size:20"`
Name string `json:"name" gorm:"size:50"`
EncounterClass_Code ere.EncounterClassCode `json:"encounterClass_code" gorm:"size:10"`
InstallationPositions []eipb.Basic `json:"installationPositions,omitempty" gorm:"foreignKey:Installation_Code;references:Code"`
@@ -5,17 +5,17 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
)
type CreateDto struct {
Encounter_Id *uint `json:"-"`
Unit_Code *string `json:"unit_code"`
Doctor_Code *string `json:"doctor_code"`
Nurse_Code *string `json:"nurse_code"`
Status_Code erc.DataApprovalCode `json:"status_code"`
SrcDoctor_Code *string `json:"srcDoctor_code"`
SrcNurse_Code *string `json:"srcNurse_code"`
Encounter_Id *uint `json:"-"`
Specialist_Code *string `json:"specialist_code"`
Doctor_Code *string `json:"doctor_code"`
Nurse_Code *string `json:"nurse_code"`
Status_Code erc.DataApprovalCode `json:"status_code"`
SrcDoctor_Code *string `json:"srcDoctor_code"`
SrcNurse_Code *string `json:"srcNurse_code"`
}
type ReadListDto struct {
@@ -25,10 +25,10 @@ type ReadListDto struct {
}
type FilterDto struct {
Encounter_Id *uint `json:"encounter-id"`
Unit_Code *uint `json:"unit-code"`
Doctor_Code *uint `json:"doctor-code"`
Status_Code erc.DataApprovalCode `json:"status-code"`
Encounter_Id *uint `json:"encounter-id"`
Specialist_Code *uint `json:"specialist-code"`
Doctor_Code *uint `json:"doctor-code"`
Status_Code erc.DataApprovalCode `json:"status-code"`
}
type ReadDetailDto struct {
@@ -53,22 +53,22 @@ type MetaDto struct {
type ResponseDto struct {
ecore.Main
Encounter_Id *uint `json:"encounter_id"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty"`
Doctor_Code *string `json:"doctor_id"`
Doctor *ed.Doctor `json:"doctor,omitempty"`
Status_Code *erc.DataApprovalCode `json:"status_code"`
Encounter_Id *uint `json:"encounter_id"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty"`
Doctor_Code *string `json:"doctor_id"`
Doctor *ed.Doctor `json:"doctor,omitempty"`
Status_Code *erc.DataApprovalCode `json:"status_code"`
}
func (d InternalReference) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Unit_Code: d.Unit_Code,
Unit: d.Unit,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
Status_Code: d.Status_Code,
Encounter_Id: d.Encounter_Id,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
Status_Code: d.Status_Code,
}
resp.Main = d.Main
return resp
@@ -6,21 +6,21 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
en "simrs-vx/internal/domain/main-entities/nurse"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
)
type InternalReference struct {
ecore.Main
Encounter_Id *uint `json:"encounter_id"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Status_Code *erc.DataApprovalCode `json:"status_code"`
SrcDoctor_Code *string `json:"srcDoctor_code"`
SrcDoctor *ed.Doctor `json:"srcDoctor,omitempty" gorm:"foreignKey:SrcDoctor_Code;references:Code"`
SrcNurse_Code *string `json:"srcNurse_code"`
SrcNurse *en.Nurse `json:"srcNurse,omitempty" gorm:"foreignKey:SrcNurse_Code;references:Code"`
Nurse_Code *string `json:"nurse_code"`
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
Encounter_Id *uint `json:"encounter_id"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Status_Code *erc.DataApprovalCode `json:"status_code"`
SrcDoctor_Code *string `json:"srcDoctor_code"`
SrcDoctor *ed.Doctor `json:"srcDoctor,omitempty" gorm:"foreignKey:SrcDoctor_Code;references:Code"`
SrcNurse_Code *string `json:"srcNurse_code"`
SrcNurse *en.Nurse `json:"srcNurse,omitempty" gorm:"foreignKey:SrcNurse_Code;references:Code"`
Nurse_Code *string `json:"nurse_code"`
Nurse *en.Nurse `json:"nurse,omitempty" gorm:"foreignKey:Nurse_Code;references:Code"`
}
+3 -1
View File
@@ -13,6 +13,8 @@ type CreateDto struct {
Uom_Code *string `json:"uom_code" validate:"maxLength=10"`
Infra_Code *string `json:"infra_code"`
Stock *int `json:"stock"`
BuyingPrice *float64 `json:"buyingPrice"`
SellingPrice *float64 `json:"sellingPrice"`
}
type ReadListDto struct {
@@ -33,7 +35,7 @@ type FilterDto struct {
}
type ReadDetailDto struct {
Id *uint16 `json:"id"`
Id *uint `json:"id"`
Code *string `json:"code"`
}
@@ -0,0 +1,73 @@
package materialpackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
em "simrs-vx/internal/domain/main-entities/material"
emp "simrs-vx/internal/domain/main-entities/material-package"
)
type CreateDto struct {
MaterialPackage_Code string `json:"materialPackage_code" validate:"maxLength=20"`
Material_Code string `json:"material_code" validate:"maxLength=20"`
Count uint16 `json:"count" validate:"required"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
Sort string `json:"sort"`
}
type FilterDto struct {
MaterialPackage_Code string `json:"material-package-code"`
Material_Code string `json:"material_code"`
}
type ReadDetailDto struct {
Id uint `json:"id"`
}
type UpdateDto struct {
Id uint `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.Main
MaterialPackage_Code string `json:"materialPackage_code"`
MaterialPackage *emp.MaterialPackage `json:"materialPackage,omitempty"`
Material_Code string `json:"material_code"`
Material *em.Material `json:"material,omitempty"`
Count *uint16 `json:"count"`
}
func (d MaterialPackageItem) ToResponse() ResponseDto {
resp := ResponseDto{
MaterialPackage_Code: d.MaterialPackage_Code,
MaterialPackage: d.MaterialPackage,
Material_Code: d.Material_Code,
Material: d.Material,
Count: d.Count,
}
resp.Id = d.Id
return resp
}
func ToResponseList(data []MaterialPackageItem) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,16 @@
package materialpackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
em "simrs-vx/internal/domain/main-entities/material"
emp "simrs-vx/internal/domain/main-entities/material-package"
)
type MaterialPackageItem struct {
ecore.Main
MaterialPackage_Code string `json:"materialPackage_code" gorm:"size:20;not null"`
MaterialPackage *emp.MaterialPackage `json:"materialPackage" gorm:"foreignKey:MaterialPackage_Code;references:Code"`
Material_Code string `json:"code" gorm:"size:20;not null"`
Material *em.Material `json:"material" gorm:"foreignKey:Material_Code;references:Code"`
Count *uint16 `json:"count"`
}
@@ -0,0 +1,66 @@
package materialpackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type CreateDto struct {
Code string `json:"code" validate:"maxLength=20"`
Name string `json:"name" validate:"maxLength=50"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
Sort string `json:"sort"`
}
type FilterDto struct {
Code string `json:"code"`
Name string `json:"name"`
}
type ReadDetailDto struct {
Id *uint16 `json:"id"`
Code *string `json:"code"`
}
type UpdateDto struct {
Id uint16 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id *uint16 `json:"id"`
Code *string `json:"code"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.SmallMain
Code string `json:"code"`
Name string `json:"name"`
}
func (d MaterialPackage) ToResponse() ResponseDto {
resp := ResponseDto{
Code: d.Code,
Name: d.Name,
}
resp.SmallMain = d.SmallMain
return resp
}
func ToResponseList(data []MaterialPackage) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,11 @@
package materialpackage
import (
ecore "simrs-vx/internal/domain/base-entities/core"
)
type MaterialPackage struct {
ecore.SmallMain
Code string `json:"code" gorm:"unique;size:20;not null"`
Name string `json:"name" gorm:"size:50"`
}
@@ -0,0 +1,6 @@
package micromcuorderitem
type SubCreateDto struct {
McuSrc_Code string `json:"mcuSrc_code" validate:"required"`
Note string `json:"note"`
}
@@ -0,0 +1,17 @@
package micromcuorderitem
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ems "simrs-vx/internal/domain/main-entities/mcu-src"
erc "simrs-vx/internal/domain/references/common"
)
type MicroMcuOrderItem struct {
ecore.BigMain // adjust this according to the needs
MicroMcuOrder_Id uint64 `json:"microMcuOrder_id" gorm:"uniqueIndex:idx_order_src"`
McuSrc_Code string `json:"mcuSrc_code" gorm:"uniqueIndex:idx_order_src"`
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
Note *string `json:"note" gorm:"size:1024"`
Result *string `json:"result"`
Status_Code erc.DataStatusCode `json:"status_code"`
}
@@ -0,0 +1,80 @@
package micromcuorderitem
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ems "simrs-vx/internal/domain/main-entities/mcu-src"
emro "simrs-vx/internal/domain/main-entities/micro-mcu-order"
erc "simrs-vx/internal/domain/references/common"
"time"
)
type CreateDto struct {
MicroMcuOrder_Id uint64 `json:"microMcuOrder_id"`
McuSrc_Code string `json:"mcuSrc_code"`
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Pagination ecore.Pagination
}
type FilterDto struct {
MicroMcuOrder_Id *uint64 `json:"micro-mcu-order-id"`
McuSrc_Code *string `json:"mcu-src-code"`
Status_Code erc.DataStatusCode `json:"status-code"`
}
type ReadDetailDto struct {
Id uint `json:"id"`
}
type UpdateDto struct {
Id uint `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint `json:"id"`
}
type SetScheduleDto struct {
Id uint `json:"id"`
ExaminationDate *time.Time `json:"examinationDate"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.BigMain
MicroMcuOrder_Id uint64 `json:"microMcuOrder_id"`
MicroMcuOrder *emro.MicroMcuOrder `json:"microMcuOrder,omitempty"`
McuSrc_Code string `json:"mcuSrc_code"`
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty"`
Result *string `json:"result"`
Status_Code erc.DataStatusCode `json:"status_code"`
}
func (d MicroMcuOrderItem) ToResponse() ResponseDto {
resp := ResponseDto{
MicroMcuOrder_Id: d.MicroMcuOrder_Id,
MicroMcuOrder: d.MicroMcuOrder,
McuSrc_Code: d.McuSrc_Code,
McuSrc: d.McuSrc,
Result: d.Result,
Status_Code: d.Status_Code,
}
resp.BigMain = d.BigMain
return resp
}
func ToResponseList(data []MicroMcuOrderItem) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,18 @@
package micromcuorderitem
import (
ems "simrs-vx/internal/domain/main-entities/mcu-src"
emo "simrs-vx/internal/domain/main-entities/micro-mcu-order"
emoib "simrs-vx/internal/domain/main-entities/micro-mcu-order-item/base"
erc "simrs-vx/internal/domain/references/common"
)
type MicroMcuOrderItem struct {
emoib.MicroMcuOrderItem
MicroMcuOrder *emo.MicroMcuOrder `json:"microMcuOrder,omitempty" gorm:"foreignKey:MicroMcuOrder_Id;references:Id"`
McuSrc *ems.McuSrc `json:"mcuSrc,omitempty" gorm:"foreignKey:McuSrc_Code;references:Code"`
}
func (d MicroMcuOrderItem) IsCompleted() bool {
return d.Status_Code == erc.DSCDone
}
@@ -0,0 +1,18 @@
package micromcuorder
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ercl "simrs-vx/internal/domain/references/clinical"
erc "simrs-vx/internal/domain/references/common"
)
type MicroMcuOrder struct {
ecore.BigMain
Encounter_Id uint `json:"encounter_id"`
Number uint64 `json:"number"`
Doctor_Code string `json:"doctor_code" gorm:"unique;size:20"`
Stage_Code ercl.McuOrderStageCode `json:"stage_code" gorm:"not null;size:10"`
AxillaryTemp float64 `json:"axillaryTemp"`
OtherNotes *string `json:"otherNotes"`
Status_Code erc.DataStatusCode `json:"status_code" gorm:"not null;size:10"`
}
@@ -0,0 +1,86 @@
package micromcuorder
import (
la "simrs-vx/internal/lib/auth"
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
ercl "simrs-vx/internal/domain/references/clinical"
)
type CreateDto struct {
Encounter_Id uint `json:"encounter_id" validate:"required"`
Number uint64 `json:"number"` // SHOULD BE AUTOMATIC WITHOUT SYNC
OrderStage_Code string `json:"orderStage_code" gorm:"not null;size:10"`
AxillaryTemp float64 `json:"axillaryTemp"`
OtherNotes string `json:"otherNotes"`
la.AuthInfo
}
type ReadListDto struct {
FilterDto
Includes string `json:"includes"`
Sort string `json:"sort"`
Pagination ecore.Pagination
}
type FilterDto struct {
Encounter_Id uint `json:"encounter-id"`
Doctor_Code string `json:"doctor-code"`
}
type ReadDetailDto struct {
Id uint64 `json:"id"`
Includes string `json:"includes"`
}
type UpdateDto struct {
Id uint64 `json:"id"`
CreateDto
}
type DeleteDto struct {
Id uint64 `json:"id"`
}
type MetaDto struct {
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Count int `json:"count"`
}
type ResponseDto struct {
ecore.BigMain
Encounter_Id uint
Encounter *ee.Encounter
Number uint64 `json:"number"`
Doctor_Code string `json:"doctor_code"`
Doctor *ed.Doctor
Stage_Code ercl.McuOrderStageCode `json:"stage_code" gorm:"not null;size:10"`
AxillaryTemp float64 `json:"axillaryTemp"`
OtherNotes *string `json:"otherNotes"`
}
func (d MicroMcuOrder) ToResponse() ResponseDto {
resp := ResponseDto{
Encounter_Id: d.Encounter_Id,
Encounter: d.Encounter,
Number: d.Number,
Doctor_Code: d.Doctor_Code,
Doctor: d.Doctor,
Stage_Code: d.Stage_Code,
AxillaryTemp: d.AxillaryTemp,
OtherNotes: d.OtherNotes,
}
resp.BigMain = d.BigMain
return resp
}
func ToResponseList(data []MicroMcuOrder) []ResponseDto {
resp := make([]ResponseDto, len(data))
for i, u := range data {
resp[i] = u.ToResponse()
}
return resp
}
@@ -0,0 +1,28 @@
package micromcuorder
import (
ed "simrs-vx/internal/domain/main-entities/doctor"
ee "simrs-vx/internal/domain/main-entities/encounter"
emmoi "simrs-vx/internal/domain/main-entities/micro-mcu-order-item/base"
eamob "simrs-vx/internal/domain/main-entities/micro-mcu-order/base"
erc "simrs-vx/internal/domain/references/common"
)
type MicroMcuOrder struct {
eamob.MicroMcuOrder
Encounter *ee.Encounter `json:"encounter,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Items []*emmoi.MicroMcuOrderItem `json:"items" gorm:"foreignKey:MicroMcuOrder_Id;references:Id"`
}
func (d MicroMcuOrder) IsNotNew() bool {
return d.Status_Code != erc.DSCNew
}
func (d MicroMcuOrder) IsCompleted() bool {
return d.Status_Code == erc.DSCDone
}
func (d MicroMcuOrder) IsSameDoctor(doctor_code *string) bool {
return d.Doctor_Code == *doctor_code
}
+27 -27
View File
@@ -4,15 +4,15 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/employee"
ei "simrs-vx/internal/domain/main-entities/infra"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
)
type CreateDto struct {
Code *string `json:"code" validate:"maxLength=20"`
Employee_Id *uint `json:"employee_id"`
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
Unit_Code *string `json:"unit_code"`
Infra_Code *string `json:"infra_code"`
Code *string `json:"code" validate:"maxLength=20"`
Employee_Id *uint `json:"employee_id"`
IHS_Number *string `json:"ihs_number" validate:"maxLength=20"`
Specialist_Code *string `json:"specialist_code"`
Infra_Code *string `json:"infra_code"`
}
type ReadListDto struct {
@@ -22,11 +22,11 @@ type ReadListDto struct {
}
type FilterDto struct {
Code *string `json:"code"`
Employee_Id *uint `json:"employee-id"`
IHS_Number *string `json:"ihs-number"`
Unit_Code *string `json:"unit-code"`
Infra_Code *string `json:"infra-code"`
Code *string `json:"code"`
Employee_Id *uint `json:"employee-id"`
IHS_Number *string `json:"ihs-number"`
Specialist_Code *string `json:"specialist-code"`
Infra_Code *string `json:"infra-code"`
}
type ReadDetailDto struct {
Id *uint16 `json:"id"`
@@ -53,26 +53,26 @@ type MetaDto struct {
type ResponseDto struct {
ecore.Main
Code *string `json:"code"`
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty"`
IHS_Number *string `json:"ihs_number"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty"`
Infra_Code *string `json:"infra_code"`
Infra *ei.Infra `json:"infra,omitempty"`
Code *string `json:"code"`
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty"`
IHS_Number *string `json:"ihs_number"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty"`
Infra_Code *string `json:"infra_code"`
Infra *ei.Infra `json:"infra,omitempty"`
}
func (d Nurse) ToResponse() ResponseDto {
resp := ResponseDto{
Code: d.Code,
Employee_Id: d.Employee_Id,
Employee: d.Employee,
IHS_Number: d.IHS_Number,
Unit_Code: d.Unit_Code,
Unit: d.Unit,
Infra_Code: d.Infra_Code,
Infra: d.Infra,
Code: d.Code,
Employee_Id: d.Employee_Id,
Employee: d.Employee,
IHS_Number: d.IHS_Number,
Specialist_Code: d.Specialist_Code,
Specialist: d.Specialist,
Infra_Code: d.Infra_Code,
Infra: d.Infra,
}
resp.Main = d.Main
return resp
+10 -10
View File
@@ -4,17 +4,17 @@ import (
ecore "simrs-vx/internal/domain/base-entities/core"
ee "simrs-vx/internal/domain/main-entities/employee"
ei "simrs-vx/internal/domain/main-entities/infra"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
)
type Nurse struct {
ecore.Main // adjust this according to the needs
Code *string `json:"code" gorm:"unique;size:20"`
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
Unit_Code *string `json:"unit_code" gorm:"size:10"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
Infra_Code *string `json:"infra_code" gorm:"size:10"`
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
ecore.Main // adjust this according to the needs
Code *string `json:"code" gorm:"unique;size:20"`
Employee_Id *uint `json:"employee_id"`
Employee *ee.Employee `json:"employee,omitempty" gorm:"foreignKey:Employee_Id;references:Id"`
IHS_Number *string `json:"ihs_number" gorm:"unique;size:20"`
Specialist_Code *string `json:"specialist_code" gorm:"size:10"`
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
Infra_Code *string `json:"infra_code" gorm:"size:10"`
Infra *ei.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Code;references:Code"`
}
@@ -60,6 +60,7 @@ type UpdateDto struct {
type DeleteDto struct {
Id uint `json:"id"`
pa.AuthInfo
}
type SearchDto struct {
@@ -15,7 +15,7 @@ type Patient struct {
RegisteredAt *time.Time `json:"registeredAt"`
RegisteredBy_User_Name *string `json:"registeredBy_user_name" gorm:"size:100"`
Status_Code erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
Number *string `json:"number" gorm:"unique;size:15"`
Number *string `json:"number" gorm:"size:15;unique"`
Parent_Number *string `json:"parent_number"`
Parent *Patient `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
}
+10 -8
View File
@@ -19,6 +19,7 @@ type CreateDto struct {
FrontTitle *string `json:"frontTitle" validate:"maxLength=50"`
EndTitle *string `json:"endTitle" validate:"maxLength=50"`
BirthDate *time.Time `json:"birthDate,omitempty"`
BirthPlace *string `json:"birthPlace" validate:"maxLength=4"`
BirthRegency_Code *string `json:"birthRegency_code" validate:"maxLength=4"`
Gender_Code *erp.GenderCode `json:"gender_code"`
ResidentIdentityNumber *string `json:"residentIdentityNumber" validate:"nik;maxLength=16"`
@@ -46,14 +47,13 @@ type ReadListDto struct {
type FilterDto struct {
Name string `json:"name"`
FrontTitle *string `json:"frontTitle"`
EndTitle *string `json:"endTitle"`
BirthDate *time.Time `json:"birthDate,omitempty"`
BirthRegency_Code *string `json:"birthRegency-code"`
FrontTitle *string `json:"front-title"`
EndTitle *string `json:"end-title"`
BirthDate *time.Time `json:"birth-date,omitempty"`
Gender_Code *erp.GenderCode `json:"gender-code"`
ResidentIdentityNumber *string `json:"residentIdentityNumber"`
PassportNumber *string `json:"passportNumber"`
DrivingLicenseNumber *string `json:"drivingLicenseNumber"`
ResidentIdentityNumber *string `json:"resident-identity-number"`
PassportNumber *string `json:"passport-number"`
DrivingLicenseNumber *string `json:"driving-license-number"`
Religion_Code *erp.ReligionCode `json:"religion-code"`
Education_Code *erp.EducationCode `json:"education-code"`
Ocupation_Code *erp.OcupationCode `json:"occupation-code"`
@@ -61,7 +61,7 @@ type FilterDto struct {
Nationality *string `json:"nationality"`
Ethnic_Code *string `json:"ethnic-code"`
Language_Code *string `json:"language-code"`
CommunicationIssueStatus bool `json:"communicationIssueStatus"`
CommunicationIssueStatus bool `json:"communication-issue-status"`
Disability *string `json:"disability"`
}
@@ -94,6 +94,7 @@ type ResponseDto struct {
FrontTitle *string `json:"frontTitle"`
EndTitle *string `json:"endTitle"`
BirthDate *time.Time `json:"birthDate,omitempty"`
BirthPlace *string `json:"birthPlace"`
BirthRegency_Code *string `json:"birthRegency_code"`
BirthRegency *er.Regency `json:"birthRegency,omitempty"`
Gender_Code *erp.GenderCode `json:"gender_code"`
@@ -128,6 +129,7 @@ func (d *Person) ToResponse() ResponseDto {
FrontTitle: d.FrontTitle,
EndTitle: d.EndTitle,
BirthDate: d.BirthDate,
BirthPlace: d.BirthPlace,
BirthRegency_Code: d.BirthRegency_Code,
BirthRegency: d.BirthRegency,
Gender_Code: d.Gender_Code,
@@ -23,6 +23,7 @@ type Person struct {
FrontTitle *string `json:"frontTitle" gorm:"size:50"`
EndTitle *string `json:"endTitle" gorm:"size:50"`
BirthDate *time.Time `json:"birthDate,omitempty"`
BirthPlace *string `json:"birthPlace,omitempty"`
BirthRegency_Code *string `json:"birthRegency_code" gorm:"size:4"`
BirthRegency *er.Regency `json:"birthRegency,omitempty" gorm:"foreignKey:BirthRegency_Code;references:Code"`
Gender_Code *erp.GenderCode `json:"gender_code" gorm:"size:10"`
@@ -6,11 +6,11 @@ import (
)
type CreateDto struct {
Doctor_Code *string `json:"doctor_code"`
Unit_Code *string `json:"unit_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime" validate:"maxLength=5"`
EndTime *string `json:"endTime" validate:"maxLength=5"`
Doctor_Code *string `json:"doctor_code"`
Specialist_Code *string `json:"specialist_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime" validate:"maxLength=5"`
EndTime *string `json:"endTime" validate:"maxLength=5"`
}
type ReadListDto struct {
@@ -20,11 +20,11 @@ type ReadListDto struct {
}
type FilterDto struct {
Doctor_Code *string `json:"doctor-code"`
Unit_Code *string `json:"unit-code"`
Day_Code *erc.DayCode `json:"day-code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
Doctor_Code *string `json:"doctor-code"`
Specialist_Code *string `json:"specialist-code"`
Day_Code *erc.DayCode `json:"day-code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
}
type ReadDetailDto struct {
@@ -48,20 +48,20 @@ type MetaDto struct {
type ResponseDto struct {
ecore.Main
Doctor_Code *string `json:"doctor_code"`
Unit_Code *string `json:"unit_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
Doctor_Code *string `json:"doctor_code"`
Specialist_Code *string `json:"specialist_code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime"`
EndTime *string `json:"endTime"`
}
func (d PracticeSchedule) ToResponse() ResponseDto {
resp := ResponseDto{
Doctor_Code: d.Doctor_Code,
Unit_Code: d.Unit_Code,
Day_Code: d.Day_Code,
StartTime: d.StartTime,
EndTime: d.EndTime,
Doctor_Code: d.Doctor_Code,
Specialist_Code: d.Specialist_Code,
Day_Code: d.Day_Code,
StartTime: d.StartTime,
EndTime: d.EndTime,
}
resp.Main = d.Main
return resp
@@ -3,17 +3,17 @@ package practiceschedule
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ed "simrs-vx/internal/domain/main-entities/doctor"
eu "simrs-vx/internal/domain/main-entities/unit"
es "simrs-vx/internal/domain/main-entities/specialist"
erc "simrs-vx/internal/domain/references/common"
)
type PracticeSchedule struct {
ecore.Main // adjust this according to the needs
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Unit_Code *string `json:"unit_code"`
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Code;references:Code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime" gorm:"size:5"`
EndTime *string `json:"endTime" gorm:"size:5"`
ecore.Main // adjust this according to the needs
Doctor_Code *string `json:"doctor_code"`
Doctor *ed.Doctor `json:"doctor,omitempty" gorm:"foreignKey:Doctor_Code;references:Code"`
Specialist_Code *string `json:"specialist_code"`
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Code;references:Code"`
Day_Code *erc.DayCode `json:"day_code"`
StartTime *string `json:"startTime" gorm:"size:5"`
EndTime *string `json:"endTime" gorm:"size:5"`
}

Some files were not shown because too many files have changed in this diff Show More