Skip to content

Commit

Permalink
ET-493-add-new-property-to-elation-user (#527)
Browse files Browse the repository at this point in the history
  • Loading branch information
sharlotta93 authored Nov 26, 2024
1 parent 065b61b commit b7edb86
Show file tree
Hide file tree
Showing 11 changed files with 255 additions and 203 deletions.
1 change: 1 addition & 0 deletions extensions/elation/__mocks__/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const patientExample: PatientInput = {
sexual_orientation: 'unknown',
primary_physician: 141127177601026,
caregiver_practice: 141127173275652,
preferred_service_location: 141127173275555,
dob: '1940-08-29',
ssn: '123456789',
race: 'Asian',
Expand Down
175 changes: 0 additions & 175 deletions extensions/elation/actions/getPatient.ts

This file was deleted.

104 changes: 104 additions & 0 deletions extensions/elation/actions/getPatient/config/dataPoints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import { type DataPointDefinition } from '@awell-health/extensions-core'

export const dataPoints = {
firstName: {
key: 'firstName',
valueType: 'string',
},
lastName: {
key: 'lastName',
valueType: 'string',
},
dob: {
key: 'dob',
valueType: 'date',
},
sex: {
key: 'sex',
valueType: 'string',
},
primaryPhysicianId: {
key: 'primaryPhysicianId',
valueType: 'number',
},
caregiverPracticeId: {
key: 'caregiverPracticeId',
valueType: 'number',
},
mainPhone: {
key: 'mainPhone',
valueType: 'telephone',
},
mobilePhone: {
key: 'mobilePhone',
valueType: 'telephone',
},
email: {
key: 'email',
valueType: 'string',
},
middleName: {
key: 'middleName',
valueType: 'string',
},
actualName: {
key: 'actualName',
valueType: 'string',
},
genderIdentity: {
key: 'genderIdentity',
valueType: 'string',
},
legalGenderMarker: {
key: 'legalGenderMarker',
valueType: 'string',
},
pronouns: {
key: 'pronouns',
valueType: 'string',
},
sexualOrientation: {
key: 'sexualOrientation',
valueType: 'string',
},
ssn: {
key: 'ssn',
valueType: 'string',
},
ethnicity: {
key: 'ethnicity',
valueType: 'string',
},
race: {
key: 'race',
valueType: 'string',
},
preferredLanguage: {
key: 'preferredLanguage',
valueType: 'string',
},
notes: {
key: 'notes',
valueType: 'string',
},
previousFirstName: {
key: 'previousFirstName',
valueType: 'string',
},
previousLastName: {
key: 'previousLastName',
valueType: 'string',
},
status: {
key: 'status',
valueType: 'string',
},
preferredServiceLocationId: {
key: 'preferredServiceLocationId',
valueType: 'number',
},
patientObject: {
key: 'patientObject',
valueType: 'json',
},
} satisfies Record<string, DataPointDefinition>
20 changes: 20 additions & 0 deletions extensions/elation/actions/getPatient/config/fields.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import {
FieldType,
NumericIdSchema,
type Field,
} from '@awell-health/extensions-core'
import z, { type ZodTypeAny } from 'zod'

export const fields = {
patientId: {
id: 'patientId',
label: 'Patient ID',
description: 'The Elation patient ID',
type: FieldType.NUMERIC,
required: true,
},
} satisfies Record<string, Field>

export const FieldsValidationSchema = z.object({
patientId: NumericIdSchema,
} satisfies Record<keyof typeof fields, ZodTypeAny>)
2 changes: 2 additions & 0 deletions extensions/elation/actions/getPatient/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { fields, FieldsValidationSchema } from './fields'
export { dataPoints } from './dataPoints'
Loading

0 comments on commit b7edb86

Please sign in to comment.