Skip to content

Commit

Permalink
chore: add patient ID in synced patient data
Browse files Browse the repository at this point in the history
  • Loading branch information
Muchogoc committed Apr 26, 2023
1 parent 99539ce commit 4399dc5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/clinical/usecases/clinical/pubsub_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func (c *UseCasesClinicalImpl) ComposeVitalsInput(ctx context.Context, input dto
patientReference := fmt.Sprintf("Patient/%v", patient.Resource.ID)
patientName := *patient.Resource.Name[0].Given[0]
observation.Subject = &domain.FHIRReferenceInput{
ID: patient.Resource.ID,
Reference: &patientReference,
Display: patientName,
}
Expand Down Expand Up @@ -179,6 +180,7 @@ func (c *UseCasesClinicalImpl) ComposeAllergyIntoleranceInput(ctx context.Contex
patientName := *patient.Resource.Name[0].Given[0]

allergy.Patient = &domain.FHIRReferenceInput{
ID: patient.Resource.ID,
Reference: &subjectReference,
Display: patientName,
}
Expand Down Expand Up @@ -296,6 +298,7 @@ func (c *UseCasesClinicalImpl) ComposeTestResultInput(ctx context.Context, input
ValueString: &input.Result.Name,
EffectiveInstant: &instant,
Subject: &domain.FHIRReferenceInput{
ID: patient.Resource.ID,
Reference: &subjectReference,
Display: patientName,
},
Expand Down Expand Up @@ -374,6 +377,7 @@ func (c *UseCasesClinicalImpl) ComposeMedicationStatementInput(ctx context.Conte
patientReference := fmt.Sprintf("Patient/%v", patient.Resource.ID)
patientName := *patient.Resource.Name[0].Given[0]
medicationStatement.Subject = &domain.FHIRReferenceInput{
ID: patient.Resource.ID,
Reference: &patientReference,
Display: patientName,
}
Expand Down

0 comments on commit 4399dc5

Please sign in to comment.