penambahan All case Satu sehat

This commit is contained in:
meninjar
2026-05-04 03:48:43 +00:00
parent 135c631021
commit af32d9cfdd
127 changed files with 617698 additions and 1168 deletions
+115 -26
View File
@@ -18,13 +18,31 @@ import (
satuSehatAuth "service/internal/satusehat/reference/auth"
satuSehatKfa "service/internal/satusehat/reference/kfa"
satuSehatKyc "service/internal/satusehat/reference/kyc"
satuSehatLocation "service/internal/satusehat/reference/location"
satuSehatOrganization "service/internal/satusehat/reference/organization"
satuSehatPatient "service/internal/satusehat/reference/patient"
satuSehatPractitioner "service/internal/satusehat/reference/practitioner"
"service/internal/satusehat/usecase/allergyintolerance"
"service/internal/satusehat/usecase/careplan"
clinicalimpression "service/internal/satusehat/usecase/clinicalImpression"
"service/internal/satusehat/usecase/composition"
satuSehatCondition "service/internal/satusehat/usecase/condition"
"service/internal/satusehat/usecase/diagnosticreport"
satuSehatEncounter "service/internal/satusehat/usecase/encounter"
"service/internal/satusehat/usecase/episodeofcare"
"service/internal/satusehat/usecase/imagingstudy"
"service/internal/satusehat/usecase/immunization"
"service/internal/satusehat/usecase/medication"
"service/internal/satusehat/usecase/medicationdispense"
"service/internal/satusehat/usecase/medicationrequest"
"service/internal/satusehat/usecase/medicationstatement"
"service/internal/satusehat/usecase/observation"
satuSehatProcedure "service/internal/satusehat/usecase/procedure"
"service/internal/satusehat/usecase/questionnaireresponse"
"service/internal/satusehat/usecase/servicerequest"
"service/internal/satusehat/usecase/specimen"
"service/internal/satusehat/usecase/studies"
"service/pkg/logger"
// roleComponent "service/internal/master/role/component"
@@ -185,9 +203,79 @@ func main() {
satuSehatProcedureRepo := satuSehatProcedure.NewRepository(satusehatClient)
satuSehatProcedureSvc := satuSehatProcedure.NewService(satuSehatProcedureRepo)
satuSehatKycRepo := satuSehatKyc.NewRepository(satusehatClient)
satuSehatKycSvc := satuSehatKyc.NewService(satuSehatKycRepo, cfg.SatuSehat)
// AllergyIntolerance
satuSehatAllergyIntoleranceRepo := allergyintolerance.NewRepository(satusehatClient)
satuSehatAllergyIntoleranceSvc := allergyintolerance.NewService(satuSehatAllergyIntoleranceRepo)
// CarePlan
satuSehatCarePlanRepo := careplan.NewRepository(satusehatClient)
satuSehatCarePlanSvc := careplan.NewService(satuSehatCarePlanRepo)
// ClinicalImpression
satuSehatClinicalImpressionRepo := clinicalimpression.NewRepository(satusehatClient)
satuSehatClinicalImpressionSvc := clinicalimpression.NewService(satuSehatClinicalImpressionRepo)
// Composition
satuSehatCompositionRepo := composition.NewRepository(satusehatClient)
satuSehatCompositionSvc := composition.NewService(satuSehatCompositionRepo)
satuSehatConditionRepo := satuSehatCondition.NewRepository(satusehatClient)
satuSehatConditionSvc := satuSehatCondition.NewService(satuSehatConditionRepo)
// DiagnosticReport
satuSehatDiagnosticReportRepo := diagnosticreport.NewRepository(satusehatClient)
satuSehatDiagnosticReportSvc := diagnosticreport.NewService(satuSehatDiagnosticReportRepo)
// EpisodeOfCare
satuSehatEpisodeOfCareRepo := episodeofcare.NewRepository(satusehatClient)
satuSehatEpisodeOfCareSvc := episodeofcare.NewService(satuSehatEpisodeOfCareRepo)
// ImagingStudy
satuSehatImagingStudyRepo := imagingstudy.NewRepository(satusehatClient)
satuSehatImagingStudySvc := imagingstudy.NewService(satuSehatImagingStudyRepo)
// Immunization
satuSehatImmunizationRepo := immunization.NewRepository(satusehatClient)
satuSehatImmunizationSvc := immunization.NewService(satuSehatImmunizationRepo)
// Medication
satuSehatMedicationRepo := medication.NewRepository(satusehatClient)
satuSehatMedicationSvc := medication.NewService(satuSehatMedicationRepo)
// MedicationDispense
satuSehatMedicationDispenseRepo := medicationdispense.NewRepository(satusehatClient)
satuSehatMedicationDispenseSvc := medicationdispense.NewService(satuSehatMedicationDispenseRepo)
// MedicationRequest
satuSehatMedicationRequestRepo := medicationrequest.NewRepository(satusehatClient)
satuSehatMedicationRequestSvc := medicationrequest.NewService(satuSehatMedicationRequestRepo)
// MedicationStatement
satuSehatMedicationStatementRepo := medicationstatement.NewRepository(satusehatClient)
satuSehatMedicationStatementSvc := medicationstatement.NewService(satuSehatMedicationStatementRepo)
// Observation
satuSehatObservationRepo := observation.NewRepository(satusehatClient)
satuSehatObservationSvc := observation.NewService(satuSehatObservationRepo)
// QuestionnaireResponse
satuSehatQuestionnaireResponseRepo := questionnaireresponse.NewRepository(satusehatClient)
satuSehatQuestionnaireResponseSvc := questionnaireresponse.NewService(satuSehatQuestionnaireResponseRepo)
// ServiceRequest
satuSehatServiceRequestRepo := servicerequest.NewRepository(satusehatClient)
satuSehatServiceRequestSvc := servicerequest.NewService(satuSehatServiceRequestRepo)
// Specimen
satuSehatSpecimenRepo := specimen.NewRepository(satusehatClient)
satuSehatSpecimenSvc := specimen.NewService(satuSehatSpecimenRepo)
// DICOM Studies
satuSehatStudiesRepo := studies.NewRepository(satusehatClient)
satuSehatStudiesSvc := studies.NewService(satuSehatStudiesRepo)
// 6. Server Orchestration (Dual Protocol & Background Workers)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@@ -230,32 +318,33 @@ func main() {
RoleMaster: roleMasterService,
},
SatuSehat: &httpServer.SatuSehatServices{
Auth: satuSehatAuthSvc,
Patient: satuSehatPatientSvc,
Practitioner: satuSehatPractitionerSvc,
Organization: satuSehatOrganizationSvc,
Location: satuSehatLocationSvc,
KFA: satuSehatKfaSvc,
Encounter: satuSehatEncounterSvc,
Procedure: satuSehatProcedureSvc,
Condition: satuSehatConditionSvc,
// TODO: Inisialisasi service sisanya di sini saat repo & service usecase lainnya sudah Anda buat, contoh:
// AllergyIntolerance: allergySvc,
// CarePlan: careplanSvc,
// ClinicalImpression: clinicalImpressionSvc,
// Composition: compositionSvc,
// DiagnosticReport: diagnosticReportSvc,
// EpisodeOfCare: episodeOfCareSvc,
// ImagingStudy: imagingStudySvc,
// Immunization: immunizationSvc,
// Medication: medicationSvc,
// MedicationDispense: medicationDispenseSvc,
// MedicationRequest: medicationRequestSvc,
// MedicationStatement: medicationStatementSvc,
// Observation: observationSvc,
// QuestionnaireResponse: questionnaireResponseSvc,
// ServiceRequest: serviceRequestSvc,
// Specimen: specimenSvc,
Auth: satuSehatAuthSvc,
Patient: satuSehatPatientSvc,
Practitioner: satuSehatPractitionerSvc,
Organization: satuSehatOrganizationSvc,
Location: satuSehatLocationSvc,
KFA: satuSehatKfaSvc,
KYC: satuSehatKycSvc,
Encounter: satuSehatEncounterSvc,
Procedure: satuSehatProcedureSvc,
Condition: satuSehatConditionSvc,
AllergyIntolerance: satuSehatAllergyIntoleranceSvc,
CarePlan: satuSehatCarePlanSvc,
ClinicalImpression: satuSehatClinicalImpressionSvc,
Composition: satuSehatCompositionSvc,
DiagnosticReport: satuSehatDiagnosticReportSvc,
EpisodeOfCare: satuSehatEpisodeOfCareSvc,
ImagingStudy: satuSehatImagingStudySvc,
Immunization: satuSehatImmunizationSvc,
Medication: satuSehatMedicationSvc,
MedicationDispense: satuSehatMedicationDispenseSvc,
MedicationRequest: satuSehatMedicationRequestSvc,
MedicationStatement: satuSehatMedicationStatementSvc,
Observation: satuSehatObservationSvc,
QuestionnaireResponse: satuSehatQuestionnaireResponseSvc,
ServiceRequest: satuSehatServiceRequestSvc,
Specimen: satuSehatSpecimenSvc,
DicomStudies: satuSehatStudiesSvc,
},
}