-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
feat: appointment details during scheduling
Showing
10 changed files
with
213 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { TouchableWithoutFeedback, View } from 'react-native'; | ||
import { cn } from '@/utils/cn'; | ||
|
||
import { Text } from './Text'; | ||
|
||
export interface RadioButtonProps { | ||
selected?: boolean; | ||
label?: string; | ||
onPress?: () => void; | ||
} | ||
|
||
export const RadioButton = ({ label, selected, onPress }: RadioButtonProps) => { | ||
return ( | ||
<TouchableWithoutFeedback onPress={onPress}> | ||
<View className="flex flex-row items-center"> | ||
<View | ||
className={cn( | ||
'border-coolGray-200 h-8 w-8 rounded-full border bg-none', | ||
selected && 'bg-cyan-300', | ||
)} | ||
/> | ||
<Text className="ml-2">{label}</Text> | ||
</View> | ||
</TouchableWithoutFeedback> | ||
); | ||
}; |
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,15 @@ | ||
import fhirpath from 'fhirpath'; | ||
|
||
import { type Location } from '@canvas-challenge/canvas'; | ||
|
||
export function getLocationAddress(location: Location): string { | ||
const [street] = fhirpath.evaluate(location, 'address.line') as string[]; | ||
|
||
const [city] = fhirpath.evaluate(location, 'address.city') as string[]; | ||
|
||
const [state] = fhirpath.evaluate(location, 'address.state') as string[]; | ||
|
||
const [postalCode] = fhirpath.evaluate(location, 'address.postalCode') as string[]; | ||
|
||
return `${street} ${city}, ${state} ${postalCode}`; | ||
} |
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,9 @@ | ||
import { api } from '@/utils/api'; | ||
|
||
export function usePractitioner(practitionerId: string) { | ||
const { data: practitioner, isLoading } = api.practitioner.get.useQuery({ | ||
id: practitionerId, | ||
}); | ||
|
||
return { practitioner, isLoading }; | ||
} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export const HARDCODED_OFFICE_LOCATION_ID = '83bb9465-b895-4539-898f-bb4b87aff340'; | ||
export const HARDCODED_OFFICE_LOCATION_ID_FOR_CREATE = '1'; |
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