Files
DentalManagement09/apps/Backend/src/storage/office-contact-storage.ts
T
GiteadandClaude Opus 5.5 f55e8c114b feat: BCBS AI column claim fills ADA form, saves to Documents; form fixes
- Claim for column with AI: BCBS patients auto-generate the 2024 ADA form
  (no tab) and save it to the patient's Documents > Claims folder; the
  manual BCBS button saves there too (new POST /api/claims/:id/ada-form)
- Saved BCBS form sets the claim to REVIEW; appointments with a claim
  number or REVIEW/APPROVED status show as claimed (dark gray)
- CDT lookup: "comp on #18 O, 20 O, 21 O" applies composite to every tooth
- BCBS fee schedule (procedureCodesBCBS.json, copied from DDMA prices)
- Office Contact: Legal Name field; "Dental Office Name (DBA)" label
- ADA form: 48 = legal name, DBA, address; 56 = address only; 53 date =
  claim date; 23 and 26 left blank; 43 = No unless appointment notes say
  a prosthesis is replaced (then Yes, with 44 prior date when given)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 23:14:51 -04:00

32 lines
757 B
TypeScript

import { prisma as db } from "@repo/db/client";
export const officeContactStorage = {
async getOfficeContact(userId: number) {
return db.officeContact.findUnique({ where: { userId } });
},
async upsertOfficeContact(userId: number, data: {
legalName?: string;
officeName?: string;
receptionistName?: string;
dentistName?: string;
phoneNumber?: string;
email?: string;
fax?: string;
streetAddress?: string;
city?: string;
state?: string;
zipCode?: string;
billingName?: string;
billingNpi?: string;
billingLicense?: string;
billingTaxId?: string;
}) {
return db.officeContact.upsert({
where: { userId },
update: data,
create: { userId, ...data },
});
},
};