Skip to content

Commit

Permalink
chore(metriport): remove metriport until api-sdk is in better shape
Browse files Browse the repository at this point in the history
  • Loading branch information
bejoinka committed Feb 3, 2025
1 parent 353f920 commit 6a2629c
Show file tree
Hide file tree
Showing 17 changed files with 33 additions and 243 deletions.
115 changes: 0 additions & 115 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions extensions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Mailgun } from './mailgun'
import { MathExtension } from './math'
import { Medplum } from './medplum'
import { MessageBird } from './messagebird'
import { Metriport } from './metriport'
// import { Metriport } from './metriport'
import { nexuzhealth } from './nexuzhealth'
import { rest } from './rest'
import { Sendbird } from './sendbird'
Expand Down Expand Up @@ -82,7 +82,7 @@ export const extensions = [
MathExtension,
MessageBird,
Medplum,
Metriport,
// Metriport,
nexuzhealth,
rest,
Sendbird,
Expand Down
30 changes: 17 additions & 13 deletions extensions/metriport/actions/patient/create.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {
type PatientCreate as MetriportPatientCreate,
usStateSchema,
} from '@metriport/api-sdk'
// import {
// type PatientCreate as MetriportPatientCreate,
// usStateSchema,
// } from '@metriport/api-sdk'
import { z } from 'zod'
import { isValid } from 'driver-license-validator'
import { type Action } from '@awell-health/extensions-core'
import { Category } from '@awell-health/extensions-core'
Expand All @@ -13,6 +14,10 @@ import { stringId } from '../../validation/generic.zod'
import { type PatientCreate, patientCreateSchema } from './validation'
import { patientIdDataPoint } from './dataPoints'

// TODO: Remove these
type MetriportPatientCreate = any
const usStateSchema = z.object({})

export const createPatient: Action<
typeof createFields,
typeof settings,
Expand Down Expand Up @@ -48,7 +53,6 @@ export const createPatient: Action<
}
},
}

export const convertToMetriportPatient = (
patient: PatientCreate,
): MetriportPatientCreate => {
Expand All @@ -57,14 +61,14 @@ export const convertToMetriportPatient = (
lastName: patient.lastName,
dob: patient.dob,
genderAtBirth: patient.genderAtBirth,
address: {
addressLine1: patient.addressLine1,
addressLine2: patient.addressLine2,
city: patient.city,
state: patient.state,
zip: patient.zip,
country: patient.country,
},
// address: {
// addressLine1: patient.addressLine1,
// addressLine2: patient.addressLine2,
// city: patient.city,
// state: patient.state,
// zip: patient.zip,
// country: patient.country,
// },
personalIdentifiers: [],
contact: {
phone: patient.phone,
Expand Down
2 changes: 1 addition & 1 deletion extensions/metriport/actions/patient/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const getPatient: Action<
}

const driversLicense = patient.personalIdentifiers.find(
(id) => id.type === 'driversLicense'
(id: any) => id.type === 'driversLicense',
)

await onComplete({
Expand Down
5 changes: 3 additions & 2 deletions extensions/metriport/actions/patient/validation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as z from 'zod'
import { addressSchema, genderAtBirthSchema } from '@metriport/api-sdk'

// import { addressSchema, genderAtBirthSchema } from '@metriport/api-sdk'
const addressSchema = z.object({})
const genderAtBirthSchema = z.object({})
export const patientCreateSchema = z
.object({
firstName: z.string().min(1),
Expand Down
16 changes: 9 additions & 7 deletions extensions/metriport/client.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { MetriportMedicalApi } from '@metriport/api-sdk'
// import { MetriportMedicalApi } from '@metriport/api-sdk'
import { type settings } from './settings'
import { settingsSchema } from './validation/settings.zod'

export const createMetriportApi = (
payloadSettings: Record<keyof typeof settings, string | undefined>,
): MetriportMedicalApi => {
const { apiKey, baseUrl } = settingsSchema.parse(payloadSettings)

return new MetriportMedicalApi(apiKey, {
baseAddress: baseUrl,
})
): any => {
return {} as any
}
// ): MetriportMedicalApi => {
// const { apiKey, baseUrl } = settingsSchema.parse(payloadSettings)

// return new MetriportMedicalApi(apiKey, {
// baseAddress: baseUrl,
// })
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
"@langchain/openai": "^0.3.0",
"@mailchimp/mailchimp_transactional": "^1.0.50",
"@medplum/core": "^3.1.4",
"@metriport/api-sdk": "^14.11.1",
"@sendgrid/client": "^7.7.0",
"@sendgrid/helpers": "^7.7.0",
"@sendgrid/mail": "^7.7.0",
Expand All @@ -105,7 +104,6 @@
"graphql": "^16.8.1",
"graphql-request": "5.1.0",
"graphql-tag": "^2.12.6",
"http-status": "1.7.4",
"jsdom": "^26.0.0",
"jsonpath": "^1.1.1",
"jsonwebtoken": "^9.0.2",
Expand Down
Loading

0 comments on commit 6a2629c

Please sign in to comment.