@nexalink/coding-contracts 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,252 @@
1
+ import { z } from "zod";
2
+ export declare const RCM_WORKFLOW_ID: "rcm-coding-assistance";
3
+ export declare const RCM_MODEL_POLICY_ID: "carecompass-rcm-review-v1";
4
+ export declare const RCM_HUMAN_REVIEW_POLICY_ID: "qualified-coder-review-v1";
5
+ export declare const RCM_OUTPUT_SCHEMA_NAME: "carecompass_rcm_grounded_review";
6
+ export declare const RCM_HUMAN_REVIEW_INSTRUCTION: "Qualified human coder review is required before billing, coding, or claim submission.";
7
+ export declare const RCM_REFERENCE_SCHEMA_VERSION: "rcm-supporting-reference-v1";
8
+ export declare const RCM_INPUT_SCHEMA_VERSION: "rcm-coding-input-v1";
9
+ export declare const RCM_OUTPUT_SCHEMA_VERSION: "rcm-grounded-human-review-v2";
10
+ export declare const RCM_MODEL_PROMPT_SCHEMA_VERSION: "rcm-model-prompt-v1";
11
+ export declare const RCM_RETRIEVAL_SCHEMA_VERSION: "rcm-retrieval-metadata-v1";
12
+ export declare const RCM_RUNTIME_EVENT_SCHEMA_VERSION: "rcm-runtime-event-v1";
13
+ export declare const RCM_WORKFLOW_CATALOG_SCHEMA_VERSION: "rcm-workflow-catalog-v1";
14
+ export declare const rcmSupportingReferenceSchema: z.ZodObject<{
15
+ referenceId: z.ZodString;
16
+ documentId: z.ZodOptional<z.ZodString>;
17
+ title: z.ZodString;
18
+ excerpt: z.ZodString;
19
+ version: z.ZodOptional<z.ZodString>;
20
+ corpusScope: z.ZodOptional<z.ZodEnum<{
21
+ base: "base";
22
+ tenant: "tenant";
23
+ }>>;
24
+ publisher: z.ZodOptional<z.ZodString>;
25
+ effectiveDate: z.ZodOptional<z.ZodString>;
26
+ retrievalDate: z.ZodOptional<z.ZodString>;
27
+ coveredPayerProgram: z.ZodOptional<z.ZodString>;
28
+ sourceUrl: z.ZodOptional<z.ZodString>;
29
+ humanReviewRequired: z.ZodOptional<z.ZodLiteral<true>>;
30
+ }, z.core.$strict>;
31
+ export type RcmSupportingReference = z.infer<typeof rcmSupportingReferenceSchema>;
32
+ export declare function rcmSupportingReferenceValidationError(value: unknown): string | null;
33
+ export declare const validRcmSupportingReference: (value: unknown) => boolean;
34
+ export declare const RcmSupportingReferenceSchemaJson: Record<string, unknown>;
35
+ export declare const rcmCodingInputSchema: z.ZodObject<{
36
+ encounterId: z.ZodString;
37
+ diagnosisNarrative: z.ZodString;
38
+ procedureNarrative: z.ZodOptional<z.ZodString>;
39
+ serviceDate: z.ZodOptional<z.ZodString>;
40
+ placeOfService: z.ZodOptional<z.ZodString>;
41
+ claimContext: z.ZodOptional<z.ZodObject<{
42
+ stage: z.ZodOptional<z.ZodEnum<{
43
+ development: "development";
44
+ staging: "staging";
45
+ production: "production";
46
+ }>>;
47
+ payerName: z.ZodOptional<z.ZodString>;
48
+ submittedCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
49
+ }, z.core.$strict>>;
50
+ supportingReferences: z.ZodOptional<z.ZodArray<z.ZodObject<{
51
+ referenceId: z.ZodString;
52
+ documentId: z.ZodOptional<z.ZodString>;
53
+ title: z.ZodString;
54
+ excerpt: z.ZodString;
55
+ version: z.ZodOptional<z.ZodString>;
56
+ corpusScope: z.ZodOptional<z.ZodEnum<{
57
+ base: "base";
58
+ tenant: "tenant";
59
+ }>>;
60
+ publisher: z.ZodOptional<z.ZodString>;
61
+ effectiveDate: z.ZodOptional<z.ZodString>;
62
+ retrievalDate: z.ZodOptional<z.ZodString>;
63
+ coveredPayerProgram: z.ZodOptional<z.ZodString>;
64
+ sourceUrl: z.ZodOptional<z.ZodString>;
65
+ humanReviewRequired: z.ZodOptional<z.ZodLiteral<true>>;
66
+ }, z.core.$strict>>>;
67
+ }, z.core.$strict>;
68
+ export type RcmCodingInput = z.infer<typeof rcmCodingInputSchema>;
69
+ export declare function rcmCodingInputValidationError(value: unknown): string | null;
70
+ export declare const validRcmCodingInput: (value: unknown) => boolean;
71
+ export declare const RcmCodingInputSchemaJson: Record<string, unknown>;
72
+ export declare const rcmCodingOutputSchema: z.ZodObject<{
73
+ disposition: z.ZodEnum<{
74
+ review_required: "review_required";
75
+ abstain: "abstain";
76
+ escalate: "escalate";
77
+ }>;
78
+ humanReviewRequired: z.ZodLiteral<true>;
79
+ rationale: z.ZodString;
80
+ recommendations: z.ZodArray<z.ZodObject<{
81
+ code: z.ZodString;
82
+ codeSystem: z.ZodEnum<{
83
+ "ICD-10-CM": "ICD-10-CM";
84
+ CPT: "CPT";
85
+ HCPCS: "HCPCS";
86
+ }>;
87
+ confidence: z.ZodEnum<{
88
+ low: "low";
89
+ medium: "medium";
90
+ high: "high";
91
+ }>;
92
+ rationale: z.ZodString;
93
+ evidenceIds: z.ZodArray<z.ZodString>;
94
+ }, z.core.$strict>>;
95
+ documentationGaps: z.ZodArray<z.ZodString>;
96
+ }, z.core.$strict>;
97
+ export type RcmCodingOutput = z.infer<typeof rcmCodingOutputSchema>;
98
+ export declare function rcmCodingOutputValidationError(value: unknown, options?: {
99
+ allowedReferenceIds?: Set<string>;
100
+ referenceTextById?: Record<string, string>;
101
+ }): string | null;
102
+ export declare const validRcmCodingOutput: (value: unknown) => boolean;
103
+ export declare const RcmCodingOutputSchemaJson: Record<string, unknown>;
104
+ export declare const rcmModelPromptSchema: z.ZodObject<{
105
+ encounter: z.ZodObject<{
106
+ encounterId: z.ZodString;
107
+ diagnosisNarrative: z.ZodString;
108
+ procedureNarrative: z.ZodOptional<z.ZodString>;
109
+ serviceDate: z.ZodOptional<z.ZodString>;
110
+ placeOfService: z.ZodOptional<z.ZodString>;
111
+ claimContext: z.ZodOptional<z.ZodObject<{
112
+ stage: z.ZodOptional<z.ZodEnum<{
113
+ development: "development";
114
+ staging: "staging";
115
+ production: "production";
116
+ }>>;
117
+ payerName: z.ZodOptional<z.ZodString>;
118
+ submittedCodes: z.ZodOptional<z.ZodArray<z.ZodString>>;
119
+ }, z.core.$strict>>;
120
+ }, z.core.$strict>;
121
+ supportingReferences: z.ZodArray<z.ZodObject<{
122
+ referenceId: z.ZodString;
123
+ documentId: z.ZodOptional<z.ZodString>;
124
+ title: z.ZodString;
125
+ excerpt: z.ZodString;
126
+ version: z.ZodOptional<z.ZodString>;
127
+ corpusScope: z.ZodOptional<z.ZodEnum<{
128
+ base: "base";
129
+ tenant: "tenant";
130
+ }>>;
131
+ publisher: z.ZodOptional<z.ZodString>;
132
+ effectiveDate: z.ZodOptional<z.ZodString>;
133
+ retrievalDate: z.ZodOptional<z.ZodString>;
134
+ coveredPayerProgram: z.ZodOptional<z.ZodString>;
135
+ sourceUrl: z.ZodOptional<z.ZodString>;
136
+ humanReviewRequired: z.ZodOptional<z.ZodLiteral<true>>;
137
+ }, z.core.$strict>>;
138
+ }, z.core.$strict>;
139
+ export type RcmModelPrompt = z.infer<typeof rcmModelPromptSchema>;
140
+ export declare function rcmModelPromptValidationError(value: unknown): string | null;
141
+ export declare const validRcmModelPrompt: (value: unknown) => boolean;
142
+ export declare const RcmModelPromptSchemaJson: Record<string, unknown>;
143
+ export declare const rcmRetrievalMetadataSchema: z.ZodObject<{
144
+ corpusId: z.ZodString;
145
+ corpusVersion: z.ZodString;
146
+ outcome: z.ZodEnum<{
147
+ completed: "completed";
148
+ empty: "empty";
149
+ failed: "failed";
150
+ }>;
151
+ latencyMs: z.ZodNumber;
152
+ knowledgeBaseId: z.ZodOptional<z.ZodString>;
153
+ tenantId: z.ZodOptional<z.ZodString>;
154
+ references: z.ZodArray<z.ZodObject<{
155
+ referenceId: z.ZodString;
156
+ documentId: z.ZodOptional<z.ZodString>;
157
+ title: z.ZodString;
158
+ excerpt: z.ZodString;
159
+ version: z.ZodOptional<z.ZodString>;
160
+ corpusScope: z.ZodOptional<z.ZodEnum<{
161
+ base: "base";
162
+ tenant: "tenant";
163
+ }>>;
164
+ publisher: z.ZodOptional<z.ZodString>;
165
+ effectiveDate: z.ZodOptional<z.ZodString>;
166
+ retrievalDate: z.ZodOptional<z.ZodString>;
167
+ coveredPayerProgram: z.ZodOptional<z.ZodString>;
168
+ sourceUrl: z.ZodOptional<z.ZodString>;
169
+ humanReviewRequired: z.ZodOptional<z.ZodLiteral<true>>;
170
+ }, z.core.$strict>>;
171
+ }, z.core.$strict>;
172
+ export type RcmRetrievalMetadata = z.infer<typeof rcmRetrievalMetadataSchema>;
173
+ export declare function rcmRetrievalMetadataValidationError(value: unknown): string | null;
174
+ export declare const validRcmRetrievalMetadata: (value: unknown) => boolean;
175
+ export declare const RcmRetrievalMetadataSchemaJson: Record<string, unknown>;
176
+ export declare const rcmRuntimeEventSchema: z.ZodObject<{
177
+ type: z.ZodEnum<{
178
+ audit: "audit";
179
+ safety: "safety";
180
+ }>;
181
+ outcome: z.ZodEnum<{
182
+ authorized: "authorized";
183
+ validated: "validated";
184
+ escalated: "escalated";
185
+ }>;
186
+ reason: z.ZodEnum<{
187
+ workflow_authorized: "workflow_authorized";
188
+ output_validated: "output_validated";
189
+ output_invalid: "output_invalid";
190
+ workflow_escalated: "workflow_escalated";
191
+ guardrail_blocked: "guardrail_blocked";
192
+ retrieval_completed: "retrieval_completed";
193
+ retrieval_failed: "retrieval_failed";
194
+ }>;
195
+ occurredAt: z.ZodString;
196
+ workflowId: z.ZodEnum<{
197
+ "rcm-coding-assistance": "rcm-coding-assistance";
198
+ }>;
199
+ guardrail: z.ZodOptional<z.ZodObject<{
200
+ stopReason: z.ZodOptional<z.ZodString>;
201
+ actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
202
+ scope: z.ZodString;
203
+ policyType: z.ZodString;
204
+ rule: z.ZodString;
205
+ action: z.ZodString;
206
+ }, z.core.$strict>>>;
207
+ }, z.core.$strict>>;
208
+ retrieval: z.ZodOptional<z.ZodObject<{
209
+ corpusId: z.ZodString;
210
+ corpusVersion: z.ZodString;
211
+ outcome: z.ZodString;
212
+ referenceCount: z.ZodNumber;
213
+ latencyMs: z.ZodNumber;
214
+ references: z.ZodArray<z.ZodObject<{
215
+ referenceId: z.ZodString;
216
+ documentId: z.ZodString;
217
+ version: z.ZodString;
218
+ }, z.core.$strict>>;
219
+ }, z.core.$strict>>;
220
+ }, z.core.$strict>;
221
+ export type RcmRuntimeEvent = z.infer<typeof rcmRuntimeEventSchema>;
222
+ export declare function rcmRuntimeEventValidationError(value: unknown): string | null;
223
+ export declare const validRcmRuntimeEvent: (value: unknown) => boolean;
224
+ export declare const RcmRuntimeEventSchemaJson: Record<string, unknown>;
225
+ export declare const rcmWorkflowCatalogSchema: z.ZodObject<{
226
+ id: z.ZodEnum<{
227
+ "rcm-coding-assistance": "rcm-coding-assistance";
228
+ }>;
229
+ name: z.ZodString;
230
+ description: z.ZodString;
231
+ environments: z.ZodArray<z.ZodEnum<{
232
+ development: "development";
233
+ production: "production";
234
+ }>>;
235
+ modelPolicy: z.ZodObject<{
236
+ policyId: z.ZodLiteral<"carecompass-rcm-review-v1">;
237
+ inferencePath: z.ZodString;
238
+ maxNewTokens: z.ZodNumber;
239
+ temperature: z.ZodNumber;
240
+ outputSchemaVersion: z.ZodLiteral<"rcm-grounded-human-review-v2">;
241
+ requireHumanReview: z.ZodLiteral<true>;
242
+ }, z.core.$strict>;
243
+ humanReviewPolicy: z.ZodObject<{
244
+ policyId: z.ZodLiteral<"qualified-coder-review-v1">;
245
+ humanReviewRequired: z.ZodLiteral<true>;
246
+ }, z.core.$strict>;
247
+ outputSchemaVersion: z.ZodLiteral<"rcm-grounded-human-review-v2">;
248
+ }, z.core.$strict>;
249
+ export type RcmWorkflowCatalog = z.infer<typeof rcmWorkflowCatalogSchema>;
250
+ export declare function rcmWorkflowCatalogValidationError(value: unknown): string | null;
251
+ export declare const validRcmWorkflowCatalog: (value: unknown) => boolean;
252
+ export declare const RcmWorkflowCatalogSchemaJson: Record<string, unknown>;