Skip to content

Commit

Permalink
chore: add terminology codes for vital signs
Browse files Browse the repository at this point in the history
  • Loading branch information
Salaton committed Mar 21, 2023
1 parent 11464d2 commit 77f442c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions pkg/clinical/application/common/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@ const (
// WeightCIELTerminologyCode is the terminology code for weight
WeightCIELTerminologyCode = "5089"

// HeightCIELTerminologyCode is the terminology code height
HeightCIELTerminologyCode = "5090"

// TemperatureCIELTerminologyCode is the terminology code for temperature
TemperatureCIELTerminologyCode = "5088"

// RespiratoryRateCIELTerminologyCode is the terminology code for respiratory rate
RespiratoryRateCIELTerminologyCode = "5242"

// PulseCIELTerminologyCode is the terminology code for pulse
PulseCIELTerminologyCode = "5087"

// BMICIELTerminologyCode is the terminology code for Body Mass Index
BMICIELTerminologyCode = "1342"

Expand Down
3 changes: 2 additions & 1 deletion pkg/clinical/usecases/clinical/observation.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import (
"fmt"
"time"

"github.com/savannahghi/clinical/pkg/clinical/application/common"
"github.com/savannahghi/clinical/pkg/clinical/application/dto"
"github.com/savannahghi/clinical/pkg/clinical/domain"
"github.com/savannahghi/scalarutils"
)

// RecordTemperature is used to record a patient's temperature and saves it as a FHIR observation
func (c *UseCasesClinicalImpl) RecordTemperature(ctx context.Context, input dto.ObservationInput) (*dto.Observation, error) {
temperatureObservation, err := c.RecordObservation(ctx, input, "5088")
temperatureObservation, err := c.RecordObservation(ctx, input, common.TemperatureCIELTerminologyCode)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 77f442c

Please sign in to comment.