@nexalink/coding-contracts 0.3.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,160 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://nexalink.care/contracts/rcm-reviewer-event.schema.json",
4
+ "title": "RcmReviewerEvent",
5
+ "description": "Tenant-scoped, PHI-free reviewer engagement event for CareCompass RCM workflows. Events carry only an opaque case reference, categorical engagement facts, and aggregate durations. They never carry prompts, model responses, document contents, patient or member identifiers, claim identifiers, or free text.",
6
+ "version": "1.0.0",
7
+ "x-wire-version": "rcm-reviewer-event-v1",
8
+ "x-wire-constant": "RCM_REVIEWER_EVENT_SCHEMA_VERSION",
9
+ "x-code": "reviewer_event",
10
+ "x-keys-code": "reviewer_event_keys",
11
+ "x-semantic": [
12
+ {
13
+ "rule": "reviewer_event_shape",
14
+ "code": "reviewer_event_shape",
15
+ "on": "eventName"
16
+ }
17
+ ],
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": [
21
+ "eventName",
22
+ "occurredAt",
23
+ "tenantRef",
24
+ "caseRef",
25
+ "workflowId",
26
+ "source"
27
+ ],
28
+ "properties": {
29
+ "eventName": {
30
+ "type": "string",
31
+ "enum": [
32
+ "review_opened",
33
+ "decision_shown",
34
+ "evidence_opened",
35
+ "evidence_copied",
36
+ "review_active_time"
37
+ ],
38
+ "x-code": "reviewer_event_name"
39
+ },
40
+ "occurredAt": {
41
+ "type": "string",
42
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$",
43
+ "format": "date-time",
44
+ "maxLength": 64,
45
+ "x-code": "reviewer_event_occurred_at"
46
+ },
47
+ "tenantRef": {
48
+ "type": "string",
49
+ "minLength": 1,
50
+ "maxLength": 128,
51
+ "pattern": "^[A-Za-z0-9_.:-]+$",
52
+ "x-code": "reviewer_event_tenant_ref"
53
+ },
54
+ "caseRef": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "maxLength": 128,
58
+ "pattern": "^[A-Za-z0-9_.:-]+$",
59
+ "x-code": "reviewer_event_case_ref"
60
+ },
61
+ "reviewId": {
62
+ "type": "string",
63
+ "minLength": 1,
64
+ "maxLength": 128,
65
+ "pattern": "^[A-Za-z0-9_.:-]+$",
66
+ "x-code": "reviewer_event_review_id"
67
+ },
68
+ "workflowId": {
69
+ "type": "string",
70
+ "enum": ["rcm-coding-assistance", "monthly-pin-time-aggregation"],
71
+ "x-code": "reviewer_event_workflow_id"
72
+ },
73
+ "packId": {
74
+ "type": "string",
75
+ "minLength": 1,
76
+ "maxLength": 80,
77
+ "pattern": "^[A-Za-z0-9_.:-]+$",
78
+ "x-code": "reviewer_event_pack_id"
79
+ },
80
+ "packVersion": {
81
+ "type": "string",
82
+ "minLength": 1,
83
+ "maxLength": 80,
84
+ "pattern": "^[A-Za-z0-9_.:-]+$",
85
+ "x-code": "reviewer_event_pack_version"
86
+ },
87
+ "environment": {
88
+ "type": "string",
89
+ "enum": ["development", "staging", "production"],
90
+ "x-code": "reviewer_event_environment"
91
+ },
92
+ "source": {
93
+ "type": "string",
94
+ "enum": ["portal", "embed"],
95
+ "x-code": "reviewer_event_source"
96
+ },
97
+ "evidenceId": {
98
+ "type": "string",
99
+ "minLength": 1,
100
+ "pattern": "^[A-Za-z0-9_.:-]{1,64}$",
101
+ "maxLength": 64,
102
+ "x-code": "reviewer_event_evidence_id"
103
+ },
104
+ "activeSeconds": {
105
+ "type": "integer",
106
+ "minimum": 0,
107
+ "maximum": 86400,
108
+ "x-code": "reviewer_event_active_seconds"
109
+ },
110
+ "idlePaused": {
111
+ "type": "boolean",
112
+ "x-code": "reviewer_event_idle_paused"
113
+ }
114
+ },
115
+ "allOf": [
116
+ {
117
+ "if": {
118
+ "properties": {
119
+ "eventName": {
120
+ "enum": ["evidence_opened", "evidence_copied"]
121
+ }
122
+ },
123
+ "required": ["eventName"]
124
+ },
125
+ "then": {
126
+ "required": ["evidenceId"]
127
+ },
128
+ "else": {
129
+ "not": {
130
+ "required": ["evidenceId"]
131
+ }
132
+ }
133
+ },
134
+ {
135
+ "if": {
136
+ "properties": {
137
+ "eventName": {
138
+ "const": "review_active_time"
139
+ }
140
+ },
141
+ "required": ["eventName"]
142
+ },
143
+ "then": {
144
+ "required": ["activeSeconds"]
145
+ },
146
+ "else": {
147
+ "not": {
148
+ "anyOf": [
149
+ {
150
+ "required": ["activeSeconds"]
151
+ },
152
+ {
153
+ "required": ["idlePaused"]
154
+ }
155
+ ]
156
+ }
157
+ }
158
+ }
159
+ ]
160
+ }
@@ -2,11 +2,18 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://nexalink.care/contracts/rcm-workflow-catalog.schema.json",
4
4
  "title": "RcmWorkflowCatalog",
5
- "description": "A single authorized workflow entry. The catalog pins the workflow identifier, model policy, human-review policy, and output schema version that the runtime and portal may offer for the RCM coding-assistance workflow. Customer configuration can never redefine these immutable server-side values.",
6
- "version": "1.0.0",
5
+ "description": "A single authorized workflow entry. The catalog pins the workflow identifier, model policy, human-review policy, and output schema version that the runtime and portal may offer for registered coding workflows (currently rcm-coding-assistance and monthly-pin-time-aggregation). Customer configuration can never redefine these immutable server-side values.",
6
+ "version": "1.1.0",
7
7
  "x-wire-version": "rcm-workflow-catalog-v1",
8
8
  "x-code": "workflow_catalog",
9
9
  "x-keys-code": "workflow_catalog_keys",
10
+ "x-semantic": [
11
+ {
12
+ "rule": "workflow_policy_binding",
13
+ "code": "workflow_policy_binding",
14
+ "on": "modelPolicy"
15
+ }
16
+ ],
10
17
  "type": "object",
11
18
  "additionalProperties": false,
12
19
  "required": [
@@ -21,7 +28,7 @@
21
28
  "properties": {
22
29
  "id": {
23
30
  "type": "string",
24
- "enum": ["rcm-coding-assistance"],
31
+ "enum": ["rcm-coding-assistance", "monthly-pin-time-aggregation"],
25
32
  "x-code": "workflow_id"
26
33
  },
27
34
  "name": {
@@ -62,8 +69,11 @@
62
69
  "properties": {
63
70
  "policyId": {
64
71
  "type": "string",
65
- "const": "carecompass-rcm-review-v1",
66
- "x-code": "model_policy_id"
72
+ "x-code": "model_policy_id",
73
+ "enum": [
74
+ "carecompass-rcm-review-v1",
75
+ "carecompass-pin-time-policy-v1"
76
+ ]
67
77
  },
68
78
  "inferencePath": {
69
79
  "type": "string",
@@ -119,5 +129,52 @@
119
129
  "x-code": "workflow_output_schema_version"
120
130
  }
121
131
  },
132
+ "allOf": [
133
+ {
134
+ "if": {
135
+ "properties": {
136
+ "id": {
137
+ "const": "rcm-coding-assistance"
138
+ }
139
+ }
140
+ },
141
+ "then": {
142
+ "properties": {
143
+ "modelPolicy": {
144
+ "properties": {
145
+ "policyId": {
146
+ "const": "carecompass-rcm-review-v1"
147
+ }
148
+ }
149
+ }
150
+ }
151
+ }
152
+ },
153
+ {
154
+ "if": {
155
+ "properties": {
156
+ "id": {
157
+ "const": "monthly-pin-time-aggregation"
158
+ }
159
+ }
160
+ },
161
+ "then": {
162
+ "properties": {
163
+ "modelPolicy": {
164
+ "properties": {
165
+ "policyId": {
166
+ "const": "carecompass-pin-time-policy-v1"
167
+ }
168
+ }
169
+ },
170
+ "environments": {
171
+ "items": {
172
+ "const": "development"
173
+ }
174
+ }
175
+ }
176
+ }
177
+ }
178
+ ],
122
179
  "x-wire-constant": "RCM_WORKFLOW_CATALOG_SCHEMA_VERSION"
123
180
  }
package/versions.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "GENERATED FILE. Schema registry derived from schemas/*.schema.json.",
3
3
  "packageName": "@nexalink/coding-contracts",
4
- "packageVersion": "0.3.0",
4
+ "packageVersion": "0.4.0",
5
5
  "schemas": {
6
6
  "coding-case-context": {
7
7
  "file": "coding-case-context.schema.json",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "coding-reviewer-action": {
57
57
  "file": "coding-reviewer-action.schema.json",
58
- "semver": "1.0.0",
58
+ "semver": "1.1.0",
59
59
  "wireVersion": "coding-reviewer-action-v1"
60
60
  },
61
61
  "coding-decision": {
@@ -88,6 +88,11 @@
88
88
  "semver": "1.0.0",
89
89
  "wireVersion": "rcm-retrieval-metadata-v1"
90
90
  },
91
+ "rcm-reviewer-event": {
92
+ "file": "rcm-reviewer-event.schema.json",
93
+ "semver": "1.0.0",
94
+ "wireVersion": "rcm-reviewer-event-v1"
95
+ },
91
96
  "rcm-runtime-event": {
92
97
  "file": "rcm-runtime-event.schema.json",
93
98
  "semver": "1.0.0",
@@ -95,7 +100,7 @@
95
100
  },
96
101
  "rcm-workflow-catalog": {
97
102
  "file": "rcm-workflow-catalog.schema.json",
98
- "semver": "1.0.0",
103
+ "semver": "1.1.0",
99
104
  "wireVersion": "rcm-workflow-catalog-v1"
100
105
  }
101
106
  }
@@ -5,6 +5,7 @@
5
5
  "rcmModelPolicyId": "carecompass-rcm-review-v1",
6
6
  "rcmHumanReviewPolicyId": "qualified-coder-review-v1",
7
7
  "rcmOutputSchemaName": "carecompass_rcm_grounded_review",
8
- "rcmHumanReviewInstruction": "Qualified human coder review is required before billing, coding, or claim submission."
8
+ "rcmHumanReviewInstruction": "Qualified human coder review is required before billing, coding, or claim submission.",
9
+ "pinTimeWorkflowId": "monthly-pin-time-aggregation"
9
10
  }
10
11
  }