@nexalink/coding-contracts 0.2.0 → 0.4.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,126 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://nexalink.care/contracts/coding-case-payer.schema.json",
4
+ "title": "CodingCasePayer",
5
+ "description": "Payer, plan, program, contract, and MAC context used to resolve applicability. memberId is a direct identifier and must never leave tenant-scoped storage for analytics surfaces. Contract and program fields are customer configuration, never immutable server policy.",
6
+ "version": "1.0.0",
7
+ "x-wire-version": "coding-case-payer-v1",
8
+ "x-wire-constant": "CODING_CASE_PAYER_SCHEMA_VERSION",
9
+ "x-code": "payer",
10
+ "x-keys-code": "payer_keys",
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["payerName"],
14
+ "properties": {
15
+ "payerName": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 200,
19
+ "x-strip-nonempty": true,
20
+ "x-code": "payer_name"
21
+ },
22
+ "payerId": {
23
+ "type": "string",
24
+ "minLength": 1,
25
+ "maxLength": 120,
26
+ "x-code": "payer_id"
27
+ },
28
+ "lineOfBusiness": {
29
+ "type": "string",
30
+ "enum": ["commercial", "government", "self_pay", "other"],
31
+ "x-code": "payer_line_of_business"
32
+ },
33
+ "memberId": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 120,
37
+ "x-code": "payer_member_id"
38
+ },
39
+ "plan": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "x-code": "payer_plan",
43
+ "x-keys-code": "payer_plan_keys",
44
+ "properties": {
45
+ "planName": {
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "maxLength": 200,
49
+ "x-code": "payer_plan_name"
50
+ },
51
+ "planId": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "maxLength": 120,
55
+ "x-code": "payer_plan_id"
56
+ }
57
+ }
58
+ },
59
+ "program": {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "x-code": "payer_program",
63
+ "x-keys-code": "payer_program_keys",
64
+ "properties": {
65
+ "programName": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "maxLength": 160,
69
+ "x-code": "payer_program_name"
70
+ },
71
+ "programCode": {
72
+ "type": "string",
73
+ "minLength": 1,
74
+ "maxLength": 80,
75
+ "x-code": "payer_program_code"
76
+ }
77
+ }
78
+ },
79
+ "contract": {
80
+ "type": "object",
81
+ "additionalProperties": false,
82
+ "x-code": "payer_contract",
83
+ "x-keys-code": "payer_contract_keys",
84
+ "properties": {
85
+ "contractId": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 120,
89
+ "x-code": "payer_contract_id"
90
+ },
91
+ "contractVersion": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "maxLength": 40,
95
+ "x-code": "payer_contract_version"
96
+ },
97
+ "effectiveDate": {
98
+ "type": "string",
99
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
100
+ "format": "date",
101
+ "x-code": "payer_contract_effective_date"
102
+ }
103
+ }
104
+ },
105
+ "mac": {
106
+ "type": "object",
107
+ "additionalProperties": false,
108
+ "x-code": "payer_mac",
109
+ "x-keys-code": "payer_mac_keys",
110
+ "properties": {
111
+ "macId": {
112
+ "type": "string",
113
+ "minLength": 1,
114
+ "maxLength": 40,
115
+ "x-code": "payer_mac_id"
116
+ },
117
+ "jurisdiction": {
118
+ "type": "string",
119
+ "minLength": 1,
120
+ "maxLength": 80,
121
+ "x-code": "payer_mac_jurisdiction"
122
+ }
123
+ }
124
+ }
125
+ }
126
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://nexalink.care/contracts/coding-case.schema.json",
4
+ "title": "CodingCase",
5
+ "description": "The canonical case envelope for encounter, claim-review, longitudinal, monthly time aggregation, and batch coding workflows. caseId is a client-supplied direct reference; analyticsId is the separate analytics-safe identifier that may be referenced by decisions and metrics without exposing case identity.",
6
+ "version": "1.0.0",
7
+ "x-wire-version": "coding-case-v1",
8
+ "x-wire-constant": "CODING_CASE_SCHEMA_VERSION",
9
+ "x-code": "coding_case",
10
+ "x-keys-code": "coding_case_keys",
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": [
14
+ "caseId",
15
+ "codingIntent",
16
+ "servicePeriod",
17
+ "context",
18
+ "clinical"
19
+ ],
20
+ "properties": {
21
+ "caseId": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 128,
25
+ "x-code": "case_id"
26
+ },
27
+ "analyticsId": {
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "maxLength": 128,
31
+ "x-code": "case_analytics_id"
32
+ },
33
+ "tenantReference": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 128,
37
+ "x-code": "case_tenant_reference"
38
+ },
39
+ "codingIntent": {
40
+ "type": "string",
41
+ "enum": [
42
+ "encounter_review",
43
+ "claim_review",
44
+ "longitudinal_review",
45
+ "monthly_time_aggregation",
46
+ "batch_review"
47
+ ],
48
+ "x-code": "case_coding_intent"
49
+ },
50
+ "servicePeriod": {
51
+ "type": "object",
52
+ "additionalProperties": false,
53
+ "required": ["startDate"],
54
+ "x-code": "case_service_period",
55
+ "x-keys-code": "case_service_period_keys",
56
+ "properties": {
57
+ "startDate": {
58
+ "type": "string",
59
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
60
+ "format": "date",
61
+ "x-code": "case_service_period_start"
62
+ },
63
+ "endDate": {
64
+ "type": "string",
65
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
66
+ "format": "date",
67
+ "x-code": "case_service_period_end"
68
+ }
69
+ }
70
+ },
71
+ "context": {
72
+ "$ref": "coding-case-context.schema.json"
73
+ },
74
+ "payer": {
75
+ "$ref": "coding-case-payer.schema.json"
76
+ },
77
+ "clinical": {
78
+ "$ref": "coding-case-clinical.schema.json"
79
+ },
80
+ "submittedClaimLines": {
81
+ "type": "array",
82
+ "maxItems": 100,
83
+ "x-code": "case_submitted_claim_lines",
84
+ "items": {
85
+ "$ref": "coding-service-line.schema.json"
86
+ }
87
+ },
88
+ "extensions": {
89
+ "type": "array",
90
+ "maxItems": 25,
91
+ "x-code": "case_extensions",
92
+ "items": {
93
+ "$ref": "coding-extension.schema.json"
94
+ }
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,172 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://nexalink.care/contracts/coding-decision-line.schema.json",
4
+ "title": "CodingDecisionLine",
5
+ "description": "One proposed claim-line action within a CodingDecision. Actions are add, retain, replace, remove, or review; each line carries code identity, modifiers, units, linked diagnoses, sequencing, confidence, rationale, and evidence references.",
6
+ "version": "1.0.0",
7
+ "x-wire-version": "coding-decision-line-v1",
8
+ "x-wire-constant": "CODING_DECISION_LINE_SCHEMA_VERSION",
9
+ "x-code": "decision_line",
10
+ "x-keys-code": "decision_line_keys",
11
+ "type": "object",
12
+ "additionalProperties": false,
13
+ "required": ["lineId", "action", "code", "confidence", "rationale"],
14
+ "properties": {
15
+ "lineId": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 60,
19
+ "x-code": "decision_line_id"
20
+ },
21
+ "action": {
22
+ "type": "string",
23
+ "enum": ["add", "retain", "replace", "remove", "review"],
24
+ "x-code": "decision_line_action"
25
+ },
26
+ "code": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["code", "codeSystem"],
30
+ "x-code": "decision_line_code",
31
+ "x-keys-code": "decision_line_code_keys",
32
+ "properties": {
33
+ "code": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 64,
37
+ "x-strip-nonempty": true,
38
+ "x-code": "decision_line_code_value"
39
+ },
40
+ "codeSystem": {
41
+ "type": "string",
42
+ "enum": [
43
+ "ICD-10-CM",
44
+ "ICD-10-PCS",
45
+ "CPT",
46
+ "HCPCS",
47
+ "NDC",
48
+ "CDT",
49
+ "REVENUE_CODE",
50
+ "DRG",
51
+ "OTHER"
52
+ ],
53
+ "x-code": "decision_line_code_system"
54
+ },
55
+ "codeVersion": {
56
+ "type": "string",
57
+ "minLength": 1,
58
+ "maxLength": 40,
59
+ "x-code": "decision_line_code_version"
60
+ }
61
+ }
62
+ },
63
+ "modifiers": {
64
+ "type": "array",
65
+ "maxItems": 8,
66
+ "x-code": "decision_line_modifiers",
67
+ "items": {
68
+ "type": "string",
69
+ "minLength": 1,
70
+ "maxLength": 8,
71
+ "x-code": "decision_line_modifiers"
72
+ }
73
+ },
74
+ "units": {
75
+ "type": "object",
76
+ "additionalProperties": false,
77
+ "x-code": "decision_line_units",
78
+ "x-keys-code": "decision_line_units_keys",
79
+ "properties": {
80
+ "count": {
81
+ "type": "integer",
82
+ "minimum": 0,
83
+ "maximum": 999999,
84
+ "x-code": "decision_line_units_count"
85
+ },
86
+ "unitOfMeasure": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "maxLength": 20,
90
+ "x-code": "decision_line_units_measure"
91
+ }
92
+ }
93
+ },
94
+ "linkedDiagnoses": {
95
+ "type": "array",
96
+ "maxItems": 20,
97
+ "x-code": "decision_line_linked_diagnoses",
98
+ "items": {
99
+ "type": "object",
100
+ "additionalProperties": false,
101
+ "required": ["diagnosisRef"],
102
+ "x-code": "decision_line_linked_diagnosis",
103
+ "x-keys-code": "decision_line_linked_diagnosis_keys",
104
+ "properties": {
105
+ "diagnosisRef": {
106
+ "type": "string",
107
+ "minLength": 1,
108
+ "maxLength": 60,
109
+ "x-code": "decision_line_diagnosis_ref"
110
+ },
111
+ "sequence": {
112
+ "type": "integer",
113
+ "minimum": 1,
114
+ "maximum": 99,
115
+ "x-code": "decision_line_diagnosis_sequence"
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "sequence": {
121
+ "type": "integer",
122
+ "minimum": 1,
123
+ "maximum": 999,
124
+ "x-code": "decision_line_sequence"
125
+ },
126
+ "confidence": {
127
+ "type": "string",
128
+ "enum": ["low", "medium", "high"],
129
+ "x-code": "decision_line_confidence"
130
+ },
131
+ "rationale": {
132
+ "type": "string",
133
+ "minLength": 1,
134
+ "maxLength": 2000,
135
+ "x-strip-nonempty": true,
136
+ "x-code": "decision_line_rationale"
137
+ },
138
+ "evidenceRefs": {
139
+ "type": "array",
140
+ "maxItems": 10,
141
+ "x-code": "decision_line_evidence_refs",
142
+ "items": {
143
+ "type": "string",
144
+ "minLength": 1,
145
+ "maxLength": 64,
146
+ "x-code": "decision_line_evidence_refs"
147
+ }
148
+ },
149
+ "gapRefs": {
150
+ "type": "array",
151
+ "maxItems": 10,
152
+ "x-code": "decision_line_gap_refs",
153
+ "items": {
154
+ "type": "string",
155
+ "minLength": 1,
156
+ "maxLength": 64,
157
+ "x-code": "decision_line_gap_refs"
158
+ }
159
+ },
160
+ "conflictRefs": {
161
+ "type": "array",
162
+ "maxItems": 10,
163
+ "x-code": "decision_line_conflict_refs",
164
+ "items": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "maxLength": 64,
168
+ "x-code": "decision_line_conflict_refs"
169
+ }
170
+ }
171
+ }
172
+ }