Spaces:
Sleeping
Sleeping
| import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; | |
| import { Document } from 'mongoose'; | |
| export type ProcedureCodeDocument = ProcedureCode & Document; | |
| ({ timestamps: true }) | |
| export class ProcedureCode { | |
| ({ required: true, unique: true, trim: true }) | |
| code: string; // e.g. 99213 | |
| ({ required: true, trim: true }) | |
| description: string; | |
| ({ trim: true }) | |
| category: string; // e.g. Evaluation and Management | |
| ({ trim: true }) | |
| subcategory: string; | |
| ({ type: Number }) | |
| relativeValueUnit: number; // RVU | |
| ({ type: Number }) | |
| globalDays: number; | |
| ({ default: true }) | |
| billable: boolean; | |
| ({ default: true }) | |
| isActive: boolean; | |
| } | |
| export const ProcedureCodeSchema = SchemaFactory.createForClass(ProcedureCode); | |
| ProcedureCodeSchema.index({ code: 'text', description: 'text', category: 'text' }); | |