Skip to content

Commit

Permalink
feat: patch patient viral load observation
Browse files Browse the repository at this point in the history
- This patches patient's viral load entries
  • Loading branch information
EspiraMarvin committed Jan 26, 2024
1 parent 214f215 commit 4e39c05
Show file tree
Hide file tree
Showing 6 changed files with 294 additions and 34 deletions.
3 changes: 2 additions & 1 deletion pkg/clinical/presentation/graph/clinical.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ extend type Mutation {
patchPatientSystolicBloodPressure(id: String!, value: String!): Observation!
patchPatientRespiratoryRate(id: String!, value: String!): Observation!
patchPatientOxygenSaturation(id: String!, value: String!): Observation!
PatchPatientPulseRate(id: String!, value: String!): Observation!
patchPatientPulseRate(id: String!, value: String!): Observation!
patchPatientViralLoad(id: String!, value: String!): Observation!

# Consent
recordConsent(input: ConsentInput!): ConsentOutput!
Expand Down
6 changes: 6 additions & 0 deletions pkg/clinical/presentation/graph/clinical.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

183 changes: 150 additions & 33 deletions pkg/clinical/presentation/graph/generated/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pkg/clinical/usecases/clinical/observation.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ func (c *UseCasesClinicalImpl) PatchPatientPulseRate(ctx context.Context, id str
return c.PatchPatientObservations(ctx, id, value)
}

// PatchPatientViralLoad patches the viral load record of a patient
func (c *UseCasesClinicalImpl) PatchPatientViralLoad(ctx context.Context, id string, value string) (*dto.Observation, error) {
return c.PatchPatientObservations(ctx, id, value)
}

// RecordWeight records a patient's weight
func (c *UseCasesClinicalImpl) RecordWeight(ctx context.Context, input dto.ObservationInput) (*dto.Observation, error) {
weightObservation, err := c.RecordObservation(ctx, input, common.WeightCIELTerminologyCode)
Expand Down
Loading

0 comments on commit 4e39c05

Please sign in to comment.