-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release: staging to production (#296)
* add conditions to patient timeline (#276) * fix: fix listing of patient conditions (#278) * fix: check encounter finished status when creating allergies (#279) * feat: add record blood sugar api (#280) * feat: add api to fetch a patient's blood sugar observation (#281) * add last menstrual period vital (#283) * add diastolic blood pressure observation (#284) * adds fetching patient's diastolic blood pressure (#286) * feat: token caching (#287) * feat: add composition resource (#282) * list patient's compositions (#289) * query observations with encounterID filter (#290) * query observations with encounterID filter * updates * query conditions with encounterID (#291) * query compositions with encounterID (#292) * feat: add date filter query on observations (#293) - rebased - has observations date filter changes ONLY * feat: add date filter on conditions (#294) - adds date filter as a search param for conditions --------- Co-authored-by: EspiraMarvin <[email protected]> Co-authored-by: Salaton <[email protected]> Co-authored-by: Charles Muchogo <[email protected]>
- Loading branch information
1 parent
f093351
commit 582f29e
Showing
37 changed files
with
5,970 additions
and
872 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package dto | ||
|
||
import ( | ||
"github.com/savannahghi/scalarutils" | ||
) | ||
|
||
// Composition is a minimal representation of a fhir Composition | ||
type Composition struct { | ||
ID string `json:"id,omitempty"` | ||
Text string `json:"text,omitempty"` | ||
Type CompositionType `json:"type,omitempty"` | ||
Category CompositionCategory `json:"category,omitempty"` | ||
Status CompositionStatusEnum `json:"status,omitempty"` | ||
PatientID string `json:"patientID,omitempty"` | ||
EncounterID string `json:"encounterID,omitempty"` | ||
Date *scalarutils.Date `json:"date"` | ||
Author string `json:"author,omitempty"` | ||
} | ||
|
||
// CompositionEdge is a composition edge | ||
type CompositionEdge struct { | ||
Node Composition | ||
Cursor string | ||
} | ||
|
||
// CompositionConnection is a Composition Connection Type | ||
type CompositionConnection struct { | ||
TotalCount int | ||
Edges []CompositionEdge | ||
PageInfo PageInfo | ||
} | ||
|
||
// CreateCompositionConnection creates a connection that follows the GraphQl Cursor Connection Specification | ||
func CreateCompositionConnection(compositions []Composition, pageInfo PageInfo, total int) CompositionConnection { | ||
connection := CompositionConnection{ | ||
TotalCount: total, | ||
Edges: []CompositionEdge{}, | ||
PageInfo: pageInfo, | ||
} | ||
|
||
for _, composition := range compositions { | ||
edge := CompositionEdge{ | ||
Node: composition, | ||
Cursor: composition.ID, | ||
} | ||
|
||
connection.Edges = append(connection.Edges, edge) | ||
} | ||
|
||
return connection | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.