Skip to content

Commit

Permalink
fix: fix listing of patient conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
EspiraMarvin committed Sep 5, 2023
1 parent bef4132 commit 67472f4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/clinical/application/dto/condition_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Condition struct {
Category ConditionCategory `json:"category"`

OnsetDate *scalarutils.Date `json:"onsetDate"`
RecordedDate scalarutils.Date `json:"recordedDate"`
RecordedDate *scalarutils.Date `json:"recordedDate"`

Note string `json:"note"`

Expand Down
4 changes: 2 additions & 2 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.

4 changes: 1 addition & 3 deletions pkg/clinical/usecases/clinical/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ func mapFHIRConditionToConditionDTO(condition domain.FHIRCondition) *dto.Conditi
category = "problem-list-item"
case string(dto.ConditionCategoryDiagnosis):
category = "encounter-diagnosis"
default:
return nil
}

output := dto.Condition{
Expand All @@ -164,7 +162,7 @@ func mapFHIRConditionToConditionDTO(condition domain.FHIRCondition) *dto.Conditi
Code: string(condition.Code.Coding[0].Code),
System: string(*condition.Code.Coding[0].System),
Category: dto.ConditionCategory(category),
RecordedDate: *condition.RecordedDate,
RecordedDate: condition.RecordedDate,
PatientID: *condition.Subject.ID,
EncounterID: *condition.Encounter.ID,
}
Expand Down

0 comments on commit 67472f4

Please sign in to comment.