Merge branch 'migration' into feat/trx-orders
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- Modify "Patient" table
|
||||
ALTER TABLE "public"."Patient" ADD COLUMN "RegisteredBy_User_Name" character varying(100) NULL;
|
||||
-- Modify "Person" table
|
||||
ALTER TABLE "public"."Person" ADD COLUMN "Confidence" character varying(512) NULL, ADD COLUMN "MaritalStatus_Code" character varying(10) NULL;
|
||||
@@ -0,0 +1,12 @@
|
||||
-- Create "VclaimMember" table
|
||||
CREATE TABLE "public"."VclaimMember" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"CardNumber" character varying(20) NULL,
|
||||
"Person_Id" bigint NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "uni_VclaimMember_CardNumber" UNIQUE ("CardNumber"),
|
||||
CONSTRAINT "fk_Person_VclaimMember" FOREIGN KEY ("Person_Id") REFERENCES "public"."Person" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "Encounter" table
|
||||
ALTER TABLE "public"."Encounter" ADD COLUMN "StartedAt" timestamptz NULL, ADD COLUMN "FinishedAt" timestamptz NULL, ADD COLUMN "RefType_Code" text NULL, ADD COLUMN "NewStatus" boolean NULL;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "Patient" table
|
||||
ALTER TABLE "public"."Patient" ADD COLUMN "Parent_Number" character varying(15) NULL, ADD CONSTRAINT "fk_Patient_Parent" FOREIGN KEY ("Parent_Number") REFERENCES "public"."Patient" ("Number") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
@@ -1,60 +1,64 @@
|
||||
h1:ieMeKh35/dro1YBBO11ZP0nZan9aJ5aFSqnEAi+T+WQ=
|
||||
20250904105930.sql h1:MEM6blCgke9DzWQSTnLzasbPIrcHssNNrJqZpSkEo6k=
|
||||
20250904141448.sql h1:J8cmYNk4ZrG9fhfbi2Z1IWz7YkfvhFqTzrLFo58BPY0=
|
||||
20250908062237.sql h1:Pu23yEW/aKkwozHoOuROvHS/GK4ngARJGdO7FB7HZuI=
|
||||
20250908062323.sql h1:oXl6Z143tOpIl4EfP4B8JNU8LrMvVmHEtCgAfiB4gs8=
|
||||
20250908073811.sql h1:m2aNXfnGxnLq1+rVWrh4f60q7fhyhV3gEwNu/OIqQlE=
|
||||
20250908073839.sql h1:cPk54xjLdMs26uY8ZHjNWLuyfAMzV7Zb0/9oJQrsw04=
|
||||
20250910055902.sql h1:5xwjAV6QbtZT9empTJKfhyAjdknbHzb15B0Ku5dzqtQ=
|
||||
20250915123412.sql h1:D83xaU2YlDEd21HLup/YQpQ2easMToYCyy/oK6AFgQs=
|
||||
20250916043819.sql h1:ekoTJsBqQZ8G8n0qJ03d13+eoNoc7sAUEQGA5D/CCxk=
|
||||
20250917040616.sql h1:zoCnmcXuM7AVv85SmN7RmFglCgJnoDmpRWExH0LAc9Q=
|
||||
20250917040751.sql h1:J1xyRrh32y1+lezwAyNwPcUQ6ABBSgbvzNLva4SVdQU=
|
||||
20250917045138.sql h1:jKe1Z0uOLG4SGBYM+S/3P+/zMPztmgoderD5swnMuCg=
|
||||
20250917093645.sql h1:cNI3Pbz1R3LxvIXLuexafJFCXUXrmuFCgXXJ2sG+FW0=
|
||||
20250918073552.sql h1:RJ1SvMzP6aeWnoPVD3eVAmIQOkcp6Php8z3QRri6v4g=
|
||||
20250918073742.sql h1:+cEsnJTJFybe2fR69ZoOiX2R6c6iITl4m6WTZ1hjyzY=
|
||||
20250918074745.sql h1:2hNVQCXF/dVYXAh+T/7oBFgERGWxzVb2FXJjwkFWGCI=
|
||||
20250923025134.sql h1:Ykz/qpHiGDXPsCsWTjydQFVSibZP2D+h2fIeb2h2JGA=
|
||||
20250924051317.sql h1:yQuW6SwJxIOM5fcxeAaie5lSm1oLysU/C2hH2xNCVoQ=
|
||||
20250929034321.sql h1:101FJ8VH12mrZWlt/X1gvKUGOhoiF8tFbjiapAjnHzg=
|
||||
20250929034428.sql h1:i+pROD9p+g5dOmmZma6WF/0Hw5g3Ha28NN85iTo1K34=
|
||||
20250930025550.sql h1:+F+CsCUXD/ql0tHGEow70GhPBX1ZybVn+bh/T4YMh7Y=
|
||||
20250930140351.sql h1:9AAEG1AnOAH+o0+oHL5G7I8vqlWOhwRlCGyyCpT/y1Q=
|
||||
20251002085604.sql h1:3xZ68eYp4urXRnvotNH1XvG2mYOSDV/j3zHEZ/txg5E=
|
||||
20251003032030.sql h1:HB+mQ2lXMNomHDpaRhB/9IwYI9/YiDO5eOJ+nAQH/jw=
|
||||
20251005060450.sql h1:LbtCE2b+8osM3CvnmQJH1uCPtn+d7WchsslBOz8bL3Q=
|
||||
20251006041122.sql h1:MlS7f21z06sutnf9dIekt5fuHJr4lgcQ4uCuCXAGsfc=
|
||||
20251006045658.sql h1:3FmGCPCzjgMPdWDRodZTsx3KVaodd9zB9ilib69aewk=
|
||||
20251006045928.sql h1:Z5g31PmnzNwk/OKdODcxZGm8fjJQdMFK32Xfnt3bRHg=
|
||||
20251007022859.sql h1:FO03zEfaNEk/aXwY81d5Lp3MoBB9kPQuXlXJ4BPiSR8=
|
||||
20251008031337.sql h1:l+sxUAGvcTfj3I6kAFHo+T6AYodC9k9GkR+jaKO2xXc=
|
||||
20251008031554.sql h1:AqrVfIhSzY3PCy8ZlP5W91wn2iznfIuj5qQfubp6/94=
|
||||
20251008052346.sql h1:nxnXmooIJ6r1mmzwnw+6efxLfc/k9h2aE6RMptPRons=
|
||||
20251008073620.sql h1:6YsJp1W4SmQJ1lxpqF27BBlDC1zqhw7Yhc7pLzQTY6M=
|
||||
20251009042854.sql h1:nkBV+R6j0fg7/JY6wH3eb5Vv0asJLnXmb6lINfT/GLQ=
|
||||
20251009052657.sql h1:EPvdsib5rzCGPryd10HShGKvFPwM/R5S2lIVwtYxpms=
|
||||
20251010031743.sql h1:T8IZmx8/btRFKLzTe78MzcBsPJNodnLvB0tby9QkirQ=
|
||||
20251010070721.sql h1:5NQUk/yOV6sABLCB7swx++YIOyJe6MnU+yt1nRzde5w=
|
||||
20251010072711.sql h1:ZJNqR2piyu8xJhBvVABSlnGEoKSKae3wuEs+wshPe4k=
|
||||
20251013044536.sql h1:0Xjw8fNILiT8nnfrJDZgQnPf3dntmIoilbapnih8AE4=
|
||||
20251013051438.sql h1:lfSuw5mgJnePBJamvhZ81osFIouXeiIEiSZ/evdwo48=
|
||||
20251013081808.sql h1:ijgjNX08G6GBjA/ks8EKtb7P7Y7Cg7zbhqEOruGnv6M=
|
||||
20251014060047.sql h1:0jqj49WTtneEIMQDBoo4c095ZGi8sCrA8NnHBrPU6D8=
|
||||
20251014063537.sql h1:VZLXol0PTsTW21Epg6vBPsztWkDtcxup9F/z88EGgIg=
|
||||
20251014063720.sql h1:2HVUyCV0ud3BJJDH2GEKZN/+IWLFPCsN1KqhP6csO14=
|
||||
20251015045455.sql h1:MeLWmMhAOAz8b15Dd7IAQnt6JxjSml02XCXK22C0Lpg=
|
||||
20251016010845.sql h1:4BncQdDOasRZJkzVJrSJJA7091A9VPNVx/faUCUPhBM=
|
||||
20251016011023.sql h1:9JB9eFZKURK5RoCVDKR6glSvdJ8NTXrN7K/4q51zkz4=
|
||||
20251016062912.sql h1:ACNn0fe+EMqUt3hoY+Dr3uqAV/QICBa1+mIW7fUc9Fk=
|
||||
20251017060617.sql h1:4T3t9ifWrEQTPMSM0XJ98pF7Qdt+UfgtMui17bhrnWI=
|
||||
20251017082207.sql h1:8vLG1l/saRRMHXkyA4nelJyjaSddhZd6r7R+Uo4JS/c=
|
||||
20251018032635.sql h1:2xey5gnO3y2XSOrU8MLlIfoylPKbRGDRtHDD07B3MbQ=
|
||||
20251018040322.sql h1:k/pdNiSoT8zFPqNQ/avOD0vYkNh3BTD64IlHrfVXr7I=
|
||||
20251019093915.sql h1:hFcQE0y+p5dZiVwePGsRGto9m/q6kJNiUZbVDd5Rnjk=
|
||||
20251020062553.sql h1:Iw7hulcm5iRQlfW+ygA4iTPxLqkxx6h9vXMXEwUAHKs=
|
||||
20251021041042.sql h1:wMgSivBV2A0NDcsLmKGIp0kMcVh2IODSG9b4dgzCaOM=
|
||||
20251021075552.sql h1:8gfSMAglflNO6L0sSzxFNEubYN8/O4thT7OQT+WH+3M=
|
||||
20251023044432.sql h1:MkvajJs3bfk9+wHvQ43/ccAluJEBARm1gWr1u92ccLA=
|
||||
20251024034832.sql h1:x3s3VEVYLOSKLAFxJGb2+c1FyTMMvPE+9k4Ew7rKQaI=
|
||||
20251024074315.sql h1:EjAjelgi5qAfcRq/8vPTlGGYHvAKxNTllm8f0SzZDns=
|
||||
h1:Yqb9JSUhzEc3RNP4eGOax6//4rndgFOUT0Q5zHfojxU=
|
||||
20250904105930.sql h1:Vv4vCurl7m7/ZB6TjRpkubHpQ4RYwSUn0QHdzfoGpzY=
|
||||
20250904141448.sql h1:FYCHH9Os4KkrZMDu/jR8FMP+wLMRW+Mb0PkLU/9BRDg=
|
||||
20250908062237.sql h1:oanBpKZd+akPu2I/xYhUSbd0G5tAFbXzKLER/Zs8ENI=
|
||||
20250908062323.sql h1:miNG9COddXkD1jGTgaROMAZ618eT6oiLGiJhXWnQwhE=
|
||||
20250908073811.sql h1:gOi5cnGG1htlpfizybYmUIT0vYjZTBfXiI0nPSYK2u8=
|
||||
20250908073839.sql h1:cWNDA4YikjoOteAJuNLFILjQUJPFB6o8Wxreiek4QyI=
|
||||
20250910055902.sql h1:nxxOGnU0BbH/v3IPgeIOXOwH8d3tKomw7h6FTeMnnBs=
|
||||
20250915123412.sql h1:mz7SiWfrdf0qE1VTSAAnA/147d6gyp6ry5vZ2bR9SH0=
|
||||
20250916043819.sql h1:RHXVtmMkB6wfv06HfPyHMBmUfIpFt1xveafNz0kwKnE=
|
||||
20250917040616.sql h1:MYVDht+akBlzQGKNu2hTTTLPEcH1bxT/Q8MK6WEtuhs=
|
||||
20250917040751.sql h1:J79YyS2JzWgh5oKXMTgh67uo3gLxKaAsxRiZmSIfjBs=
|
||||
20250917045138.sql h1:/SM1N4O8X3yxpoJgMEARmS1uOkuLKsTOy4PLsRCOKaQ=
|
||||
20250917093645.sql h1:PNBTGZ7s10e5b5+Tie8YfVQBN0zKtJ5T34oK1iOUEb4=
|
||||
20250918073552.sql h1:jG7+g3i8ODYaJdcdZz12v3nbsZ5mB9wG6kWnGyTQIRI=
|
||||
20250918073742.sql h1:j+rgw7puxE7s+phqPVZHmPk0af3rcaA56Itp86y1suY=
|
||||
20250918074745.sql h1:rPmP4DXs6OnY4Vp+xO/z9jFpJt/RrJ52SJJjIIxeDvc=
|
||||
20250923025134.sql h1:2r6pcwnBSU5Y9Czk1OHBoh4yZXiMtEca9X8843fTEX0=
|
||||
20250924051317.sql h1:iUAk2gsGoEGIPQ0lEEUp8maMSId8emNbP+kP712ABIA=
|
||||
20250929034321.sql h1:UlpALNVmdi95zOIT0yc6ZyTj9bBjQEIpZhvgrc52M+k=
|
||||
20250929034428.sql h1:feF+H4nDyHh5bdx48Oiz0A1qecZfi6v3qTTdjzJ45Dg=
|
||||
20250930025550.sql h1:6XT1kXI3Z3ZIxxmvT7poufZWWCW0QiejZPaFV5wBnjI=
|
||||
20250930140351.sql h1:HxnmAbh9gCy8jwl/9ycGktiByaUripsjFFvohofY2CY=
|
||||
20251002085604.sql h1:SjLPi+ZN6qDccK3DaEQCgNsZpPwr5kynWXwbwEsziCI=
|
||||
20251003032030.sql h1:oHfxNSuqTxU8Zaf9H+h8TuUb1Da03wcyc6hZjDrUQ2s=
|
||||
20251005060450.sql h1:GIuCcrd4MwjmXpvbzDzPYL18BV3QaZZ+Y2FmEzjvi0E=
|
||||
20251006041122.sql h1:uNDQbSw0M08lYoMvUNlQtS3iDzpPM1ixT13ugSAoWjE=
|
||||
20251006045658.sql h1:z+t7yCK54Q4SSiF9kUyUhkYB2F+kzSW9TB7ogxd9wzw=
|
||||
20251006045928.sql h1:1lATLFLp4BWwGZqAjZdP0Dc6ypNXiYcwjoNkqGa8NFE=
|
||||
20251007022859.sql h1:HXXwWrkyvzJzJGAt9mGskCRBBV/c1JfPmfjDocmJhQ4=
|
||||
20251008031337.sql h1:Ln5pCF3Hxa5foHZLcds+z/us2eH6VAhhEj3w0TAGlVs=
|
||||
20251008031554.sql h1:aB4MUS2lmqG0//4HKUWorcPSpWya0VC4QItvGyskEVI=
|
||||
20251008052346.sql h1:MI3AZgU5XcwZT2OvvlWAxdRtL0eJ3jjRwt56IY1+pRU=
|
||||
20251008073620.sql h1:sztWXuSNYwpEraaSapSsYwno75LO5H/N7ob7OJQ8X/A=
|
||||
20251009042854.sql h1:TnPXj+dCJls3IU//cuqJZymyBzZMKs7ayazfgtAFRxM=
|
||||
20251009052657.sql h1:leXbs0CP8r5dRilmYyLRk1MICqak3ea1/LWMtFrijqQ=
|
||||
20251010031743.sql h1:SgHNY/lQ88G2F4nZyMfiOkDntb+gtOR+nEQLqXBTwv4=
|
||||
20251010070721.sql h1:AnJnhXsMzDvK4AFgYw6B16Kpo/hljrZtcpc9m2VOSHQ=
|
||||
20251010072711.sql h1:aXPTtNwLcTuw8C/yAxwxvqs0ayEjNzI1uuE0vE3ERa8=
|
||||
20251013044536.sql h1:7Pq6JcvTpPBYDCW2dz3HdgUwY65HlhEVWy9TiG8iONE=
|
||||
20251013051438.sql h1:X6t8bkqpUYYokBunSufMQUe5vCg0VyO6dxbm7ngosUc=
|
||||
20251013081808.sql h1:495pLguXL2Ozh+ycn4UYZgZbn6WbjXNbyZUc3JU8qhI=
|
||||
20251014060047.sql h1:nCgImMRGHhziiW57O1ofWaXCAPGaCOHN7PldQ3OSmM4=
|
||||
20251014063537.sql h1:2cLmID79jP6cuQ1YJaWTtghFiM1GtHMC0ZQl30Hpy1M=
|
||||
20251014063720.sql h1:bzLKKVAjSHgDFoiI/glj7t1ETlSAKx+AlsIAaP0ru2g=
|
||||
20251015045455.sql h1:S547+UugQhlTRcn1Lm1IfqT5RNPttIWIiD+RTx69YaE=
|
||||
20251016010845.sql h1:c9DUvxl17pUkf0azdYGM/YDzYxIJkLcfZOcMI4rL+R0=
|
||||
20251016011023.sql h1:u3ivg83bXgYHBbojbWpemLxPE9Dmmj53B6LXo664jxw=
|
||||
20251016062912.sql h1:W9n1hWchfYkqNX9LO9uxFxEXAb/iY+Pexjnhmp6PbgI=
|
||||
20251017060617.sql h1:VU6yZ2+LfHpDZ3+TIH40t3F5YXPCpTppuF9+uSqa4b8=
|
||||
20251017082207.sql h1:QshZslfedckz7iDpSGmPyY9sP6dy6ckHbs8L1TuXIA4=
|
||||
20251018032635.sql h1:M1U/9W/F9wlW5YDmVAmHFfUJU7FWFaX0DblpfZcYWrE=
|
||||
20251018040322.sql h1:Zk/vw0e6AzWFO2ElLOzB+OrSz6k+h1Ynxp0TImAzxwY=
|
||||
20251019093915.sql h1:3Q0kPiZwJnHn5rAvdh0w1LBdiA7W2xBmZWncoPXb044=
|
||||
20251020062553.sql h1:mJwC/J8GzPAIXckNMvy1f/Nguk2VVf8roD/Raclhbao=
|
||||
20251021041042.sql h1:d1BAOGAQhqr+oOwcpAVozUsTh457VSDEk2qQFavGG58=
|
||||
20251021075552.sql h1:TNChGQ1Zlr/1iQ6qvK4iDTAJpe6L/z/M6e/O0SkQVaM=
|
||||
20251023044432.sql h1:GA2AdJk2ULyjr6igtu9C/CEi4YUIks8r9jXGGaCvPsk=
|
||||
20251024034832.sql h1:RXmbEhMkOLK5g1QL6up8iRPcwYfo89oLP26ZHvrUK9o=
|
||||
20251024074315.sql h1:3GnPQSbuAAfMa8oWDyBjhXqn1j1zunY/w0ydX0IGPrA=
|
||||
20251025013451.sql h1:5eNrA9LDxA4i5CCP7wSyOgFZ6t6jBWVil+oGzJpkJ2E=
|
||||
20251025013609.sql h1:+N6EHc1kv3hqf16CUhXe+UITPmoxOPfi4MECLmJXNrc=
|
||||
20251027075128.sql h1:PQflgsjce/p2ClbybLtdehdPNDcMZ9Lb1vd98xd0K8E=
|
||||
20251027091406.sql h1:bYXV57GvodCMjg0/ox+XKGIAGhrDlVuJ1wO4foNEKtQ=
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
package vclaimmember
|
||||
@@ -0,0 +1,9 @@
|
||||
package vclaimmember
|
||||
|
||||
import ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
|
||||
type VclaimMember struct {
|
||||
ecore.Main
|
||||
CardNumber *string `json:"cardNumber" gorm:"unique;size:20"`
|
||||
Person_Id *uint `json:"person_id"`
|
||||
}
|
||||
@@ -32,10 +32,13 @@ type Encounter struct {
|
||||
Subspecialist_Id *uint16 `json:"subspecialist_id"`
|
||||
Subspecialist *ess.Subspecialist `json:"subspecialist,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"`
|
||||
VisitDate time.Time `json:"visitDate"`
|
||||
StartedAt *time.Time `json:"startedAt"`
|
||||
FinishedAt *time.Time `json:"finishedAt"`
|
||||
PaymentMethod_Code erc.PaymentMethodCode `json:"paymentMethod_code" gorm:"size:10"`
|
||||
InsuranceCompany_Id *uint `json:"insuranceCompany_id"`
|
||||
InsuranceCompany *ei.InsuranceCompany `json:"insuranceCompany,omitempty" gorm:"foreignKey:InsuranceCompany_Id;references:Id"`
|
||||
Member_Number *string `json:"memberNumber" gorm:"unique;size:20"`
|
||||
RefType_Code *ere.RefTypeCode `json:"refType_code"`
|
||||
Ref_Number *string `json:"refNumber" gorm:"unique;size:20"`
|
||||
Trx_Number *string `json:"trxNumber" gorm:"unique;size:20"`
|
||||
Appointment_Doctor_Id *uint `json:"appointment_doctor_id"`
|
||||
@@ -57,6 +60,7 @@ type Encounter struct {
|
||||
Discharge_Date *time.Time `json:"discharge_date"`
|
||||
InternalReferences *[]eir.InternalReference `json:"internalReferences,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
DeathCause *edc.DeathCause `json:"deathCause,omitempty" gorm:"foreignKey:Encounter_Id;references:Id"`
|
||||
NewStatus bool `json:"newStatus"`
|
||||
}
|
||||
|
||||
func (d Encounter) IsDone() bool {
|
||||
|
||||
@@ -8,11 +8,14 @@ import (
|
||||
)
|
||||
|
||||
type Patient struct {
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
|
||||
NewBornStatus bool `json:"newBornStatus"`
|
||||
RegisteredAt *time.Time `json:"registeredAt"`
|
||||
Status_Code erc.ActiveStatusCode `json:"status_code" gorm:"not null;size:10"`
|
||||
Number *string `json:"number" gorm:"unique;size:15"`
|
||||
ecore.Main // adjust this according to the needs
|
||||
Person_Id *uint `json:"person_id"`
|
||||
Person *ep.Person `json:"person,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
|
||||
NewBornStatus bool `json:"newBornStatus"`
|
||||
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"`
|
||||
Parent_Number *string `json:"parent_number"`
|
||||
Parent *Patient `json:"parent,omitempty" gorm:"foreignKey:Parent_Number;references:Number"`
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package person
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
evm "simrs-vx/internal/domain/bpjs-entities/vclaim-member"
|
||||
ee "simrs-vx/internal/domain/main-entities/ethnic"
|
||||
el "simrs-vx/internal/domain/main-entities/language"
|
||||
epa "simrs-vx/internal/domain/main-entities/person-address"
|
||||
@@ -28,9 +29,11 @@ type Person struct {
|
||||
PassportNumber *string `json:"passportNumber" gorm:"unique;size:20"`
|
||||
DrivingLicenseNumber *string `json:"drivingLicenseNumber" gorm:"unique;size:20"`
|
||||
Religion_Code *erp.ReligionCode `json:"religion_code" gorm:"size:10"`
|
||||
Confidence *string `json:"confidence" gorm:"size:512"`
|
||||
Education_Code *erp.EducationCode `json:"education_code" gorm:"size:10"`
|
||||
Ocupation_Code *erp.OcupationCode `json:"occupation_code" gorm:"size:15"`
|
||||
Ocupation_Name *string `json:"occupation_name" gorm:"size:50"`
|
||||
MaritalStatus_Code *erp.MaritalStatusCode `json:"maritalStatus_code" gorm:"size:10"`
|
||||
Nationality *string `json:"nationality": gorm:"size:50"`
|
||||
Ethnic_Code *string `json:"ethnic_code" gorm:"size:20"`
|
||||
Ethnic *ee.Ethnic `json:"ethnic,omitempty" gorm:"foreignKey:Ethnic_Code;references:Code"`
|
||||
@@ -46,6 +49,7 @@ type Person struct {
|
||||
Contacts *[]epc.PersonContact `json:"contacts" gorm:"foreignKey:Person_Id"`
|
||||
Relatives *[]epr.PersonRelative `json:"relatives" gorm:"foreignKey:Person_Id"`
|
||||
Insurances *[]epi.PersonInsurance `json:"insurances" gorm:"foreignKey:Person_Id"`
|
||||
VclaimMember *evm.VclaimMember `json:"vclaimMember,omitempty" gorm:"foreignKey:Person_Id;references:Id"`
|
||||
}
|
||||
|
||||
func (d Person) IsSameResidentIdentityNumber(input *string) bool {
|
||||
|
||||
@@ -3,6 +3,7 @@ package specialist
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
espb "simrs-vx/internal/domain/main-entities/specialist-position/base"
|
||||
essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
)
|
||||
|
||||
type CreateDto struct {
|
||||
@@ -52,6 +53,7 @@ type ResponseDto struct {
|
||||
Name string `json:"name"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
SpecialistPositions []espb.Basic `json:"specialistPositions,omitempty"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty"`
|
||||
}
|
||||
|
||||
func (d Specialist) ToResponse() ResponseDto {
|
||||
@@ -60,6 +62,7 @@ func (d Specialist) ToResponse() ResponseDto {
|
||||
Name: d.Name,
|
||||
Unit_Id: d.Unit_Id,
|
||||
SpecialistPositions: d.SpecialistPositions,
|
||||
Subspecialists: d.Subspecialists,
|
||||
}
|
||||
resp.SmallMain = d.SmallMain
|
||||
return resp
|
||||
|
||||
@@ -3,14 +3,16 @@ package specialist
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
eub "simrs-vx/internal/domain/main-entities/specialist-position/base"
|
||||
essb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
eu "simrs-vx/internal/domain/main-entities/unit"
|
||||
)
|
||||
|
||||
type Specialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||
SpecialistPositions []eub.Basic `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Unit_Id *uint16 `json:"unit_id"`
|
||||
Unit *eu.Unit `json:"unit,omitempty" gorm:"foreignKey:Unit_Id"`
|
||||
SpecialistPositions []eub.Basic `json:"specialistPositions,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
Subspecialists []essb.Basic `json:"subspecialists,omitempty" gorm:"foreignKey:Specialist_Id;references:Id"`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package base
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
)
|
||||
|
||||
type Basic struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
}
|
||||
|
||||
func (Basic) TableName() string {
|
||||
return "Subspecialist"
|
||||
}
|
||||
@@ -1,16 +1,13 @@
|
||||
package subspecialist
|
||||
|
||||
import (
|
||||
ecore "simrs-vx/internal/domain/base-entities/core"
|
||||
es "simrs-vx/internal/domain/main-entities/specialist"
|
||||
espb "simrs-vx/internal/domain/main-entities/subspecialist-position/base"
|
||||
esb "simrs-vx/internal/domain/main-entities/subspecialist/base"
|
||||
)
|
||||
|
||||
type Subspecialist struct {
|
||||
ecore.SmallMain // adjust this according to the needs
|
||||
Code string `json:"code" gorm:"unique;size:10"`
|
||||
Name string `json:"name" gorm:"size:50"`
|
||||
Specialist_Id *uint16 `json:"specialist_id"`
|
||||
esb.Basic
|
||||
Specialist *es.Specialist `json:"specialist,omitempty" gorm:"foreignKey:Specialist_Id"`
|
||||
SubspecialistPositions []espb.Basic `json:"subspecialistPositions,omitempty" gorm:"foreignKey:Subspecialist_Id;references:Id"`
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ type (
|
||||
ChemoClassCode string
|
||||
AmbulanceFacilityCode string
|
||||
AmbulanceNeedsCode string
|
||||
RefTypeCode string
|
||||
AllPaymentMethodCode string
|
||||
SEPRefTypeCode string
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -90,6 +93,19 @@ const (
|
||||
|
||||
ANCAssist AmbulanceNeedsCode = "assist" // Dengan Pendampingan
|
||||
ANCNonassist AmbulanceNeedsCode = "non-assist" // Tanpa Pendampingan
|
||||
|
||||
RTCNone RefTypeCode = "none" // Tidak Ada
|
||||
RTCGov RefTypeCode = "gov" // Pemerintah
|
||||
RTCPrivate RefTypeCode = "private" // Swasta
|
||||
RTCBpjs RefTypeCode = "bpjs" // BPJS
|
||||
|
||||
APMCJkn AllPaymentMethodCode = "jkn" // JKN
|
||||
APMCJkmm AllPaymentMethodCode = "jkmm" // JKMM
|
||||
APMCSpm AllPaymentMethodCode = "spm" // SPM
|
||||
APMCPks AllPaymentMethodCode = "pks" // PKS
|
||||
|
||||
SRTCInternal SEPRefTypeCode = "internal" // Rujukan Internal
|
||||
SRTCExternal SEPRefTypeCode = "external" // Faskes Lain
|
||||
)
|
||||
|
||||
func (ec EncounterClassCode) Code() string {
|
||||
|
||||
@@ -30,10 +30,10 @@ const (
|
||||
BTCOPositive BloodTypeCode = "O+"
|
||||
BTCONegative BloodTypeCode = "O-"
|
||||
|
||||
MSCBelumKawin MaritalStatusCode = "S"
|
||||
MSCKawin MaritalStatusCode = "M"
|
||||
MSCCeraiHidup MaritalStatusCode = "D"
|
||||
MSCCeraiMati MaritalStatusCode = "W"
|
||||
MaritalStatusSingle MaritalStatusCode = "S" // Single (Belum Kawin)
|
||||
MaritalStatusMarried MaritalStatusCode = "M" // Married (Kawin)
|
||||
MaritalStatusDivorced MaritalStatusCode = "D" // Divorced (Cerai Hidup)
|
||||
MaritalStatusWidowed MaritalStatusCode = "W" // Widowed (Cerai Mati)
|
||||
|
||||
RCIslam ReligionCode = "islam"
|
||||
RCProtestan ReligionCode = "protestan"
|
||||
@@ -42,18 +42,20 @@ const (
|
||||
RCBudha ReligionCode = "budha"
|
||||
RCKonghucu ReligionCode = "konghucu"
|
||||
|
||||
ECTS EducationCode = "TS"
|
||||
ECTK EducationCode = "TK"
|
||||
ECSD EducationCode = "SD"
|
||||
ECSLTP EducationCode = "SMP"
|
||||
ECSLTA EducationCode = "SMA"
|
||||
ECD1 EducationCode = "D1"
|
||||
ECD2 EducationCode = "D2"
|
||||
ECD3 EducationCode = "D3"
|
||||
ECD4 EducationCode = "D4"
|
||||
ECS1 EducationCode = "S1"
|
||||
ECS2 EducationCode = "S2"
|
||||
ECS3 EducationCode = "S3"
|
||||
ECTS EducationCode = "TS"
|
||||
ECTK EducationCode = "TK"
|
||||
ECSD EducationCode = "SD"
|
||||
ECSLTP EducationCode = "SMP"
|
||||
ECSLTA EducationCode = "SMA"
|
||||
ECD1 EducationCode = "D1"
|
||||
ECD2 EducationCode = "D2"
|
||||
ECD3 EducationCode = "D3"
|
||||
ECD4 EducationCode = "D4"
|
||||
ECS1 EducationCode = "S1"
|
||||
ECS2 EducationCode = "S2"
|
||||
ECS3 EducationCode = "S3"
|
||||
ECOther EducationCode = "other"
|
||||
ECUnkown EducationCode = "unknown"
|
||||
|
||||
OCTidakBekerja OcupationCode = "tidak-bekerja"
|
||||
OCPns OcupationCode = "pns"
|
||||
|
||||
@@ -92,6 +92,7 @@ import (
|
||||
village "simrs-vx/internal/domain/main-entities/village"
|
||||
|
||||
///BPJS
|
||||
vclaimmember "simrs-vx/internal/domain/bpjs-entities/vclaim-member"
|
||||
vclaimsep "simrs-vx/internal/domain/bpjs-entities/vclaim-sep"
|
||||
vclaimsephist "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-hist"
|
||||
vclaimsepprint "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-print"
|
||||
@@ -191,5 +192,6 @@ func getMainEntities() []any {
|
||||
&subspecialistposition.SubspecialistPosition{},
|
||||
&responsibledoctorhist.ResponsibleDoctorHist{},
|
||||
&admemployeehist.AdmEmployeeHist{},
|
||||
&vclaimmember.VclaimMember{},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user