Skip to content

Commit

Permalink
Merge pull request #532 from lifeomic/fix-track-tile-bugs
Browse files Browse the repository at this point in the history
Fix Track Tile Bugs
  • Loading branch information
sternetj committed Feb 19, 2024
2 parents 9c6c3a3 + 0d9ec4d commit a1df60c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/TrackTile/PillarsTile/Pillar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ export const Pillar: FC<PillarProps> = (props) => {
<TouchableOpacity
testID={tID(`pillar-increment-${metricId}`)}
onPress={() => onAddData(increment)}
disabled={loading}
>
<Indicator
name="pillars-add-data-button-icon"
Expand Down
2 changes: 1 addition & 1 deletion src/components/TrackTile/TrackerDetails/TrackerDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const TrackerDetails: FC<TrackerDetailsProps> = (props) => {
createDate: isToday(dateRange.start)
? new Date()
: dateRange.start,
...activeValues[metricId]?.[0],
...trackerValue,
value: convertToPreferredUnit(resourceValue, tracker),
tracker,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ describe('useAxiosTrackTileService', () => {
dates: ['ge2021-07-23T00:00:00.000Z', 'le2021-07-30T00:00:00.000Z'],
patientId: 'patient-id',
codeBelow: valuesContext.codeBelow,
first: 200,
},
query: FETCH_TRACKER_VALUES_BY_DATES_QUERY,
},
Expand Down Expand Up @@ -435,6 +436,7 @@ describe('useAxiosTrackTileService', () => {
dates: ['ge2021-07-23T00:00:00.000Z', 'le2021-07-30T00:00:00.000Z'],
codeBelow: customValuesContext.codeBelow,
patientId: 'patient-id',
first: 200,
},
query: FETCH_TRACKER_VALUES_BY_DATES_QUERY,
},
Expand Down Expand Up @@ -528,6 +530,7 @@ describe('useAxiosTrackTileService', () => {
],
patientId: 'patient-id',
codeBelow: valuesContext.codeBelow,
first: 200,
},
query: FETCH_TRACKER_VALUES_BY_DATES_QUERY,
},
Expand All @@ -544,6 +547,7 @@ describe('useAxiosTrackTileService', () => {
],
patientId: 'patient-id',
codeBelow: valuesContext.codeBelow,
first: 200,
},
query: FETCH_TRACKER_VALUES_BY_DATES_QUERY,
},
Expand Down Expand Up @@ -629,6 +633,7 @@ describe('useAxiosTrackTileService', () => {
],
patientId: 'patient-id',
codeBelow: pillarValuesContext.codeBelow,
first: 200,
},
query: FETCH_TRACKER_VALUES_BY_DATES_QUERY,
},
Expand Down
7 changes: 4 additions & 3 deletions src/components/TrackTile/hooks/useAxiosTrackTileService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ export const useAxiosTrackTileService = (): TrackTileService => {
dates: [`ge${start}`, `le${end}`],
codeBelow: valuesContext.codeBelow,
patientId,
first: 200,
},
query: FETCH_TRACKER_VALUES_BY_DATES_QUERY,
},
Expand Down Expand Up @@ -488,9 +489,9 @@ export type Procedure = {
};

export const FETCH_TRACKER_VALUES_BY_DATES_QUERY = `
query GetObservations($dates: [String!], $codeBelow: String!, $patientId: String) {
query GetObservations($dates: [String!], $codeBelow: String!, $patientId: String, $first: Int) {
patient(id: $patientId) {
observationsConnection(dates: $dates, codeBelow: $codeBelow) {
observationsConnection(dates: $dates, codeBelow: $codeBelow, first: $first) {
edges {
node {
id
Expand All @@ -509,7 +510,7 @@ query GetObservations($dates: [String!], $codeBelow: String!, $patientId: String
}
}
}
proceduresConnection(dates: $dates, codeBelow: $codeBelow) {
proceduresConnection(dates: $dates, codeBelow: $codeBelow, first: $first) {
edges {
node {
id
Expand Down

0 comments on commit a1df60c

Please sign in to comment.