Skip to content

Commit 310a102

Browse files
authored
Merge pull request #86 from aurelianware/copilot/implement-payer-to-payer-api
2 parents 92745b2 + edcf3dd commit 310a102

File tree

11 files changed

+2594
-1102
lines changed

11 files changed

+2594
-1102
lines changed

.eslintrc.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
{
22
"env": {
33
"node": true,
4-
"es2021": true
4+
"es2020": true
55
},
66
"extends": [
7-
"eslint:recommended"
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
89
],
910
"parser": "@typescript-eslint/parser",
1011
"parserOptions": {
11-
"ecmaVersion": 12,
12-
"sourceType": "module",
13-
"project": "./tsconfig.json"
12+
"ecmaVersion": 2020,
13+
"sourceType": "module"
1414
},
15+
"plugins": [
16+
"@typescript-eslint"
17+
],
1518
"rules": {
16-
"no-console": "off",
17-
"no-unused-vars": "off"
19+
"@typescript-eslint/no-explicit-any": "warn",
20+
"@typescript-eslint/explicit-module-boundary-types": "off",
21+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
22+
"no-console": "off"
1823
},
1924
"ignorePatterns": [
2025
"node_modules/",
2126
"dist/",
22-
"**/*.test.ts",
23-
"**/*.js"
27+
"*.js"
2428
]
2529
}

README.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Cloud Health Office
22

33
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Faurelianware%2Fcloudhealthoffice%2Fmain%2Fazuredeploy.json)
4-
[![Tests](https://img.shields.io/badge/tests-62%20passing-brightgreen)](https://github.com/aurelianware/cloudhealthoffice)
4+
[![Tests](https://img.shields.io/badge/tests-193%20passing-brightgreen)](https://github.com/aurelianware/cloudhealthoffice)
55
[![HIPAA Compliant](https://img.shields.io/badge/HIPAA-compliant-blue)](./SECURITY.md)
66
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](./LICENSE)
77

@@ -155,6 +155,66 @@ const matchResult = await api.matchMember(request, candidatePatients);
155155

156156
**Documentation:** [FHIR-INTEGRATION.md](./docs/FHIR-INTEGRATION.md)
157157

158+
### CMS-0057-F Payer-to-Payer Data Exchange
159+
Complete bulk data exchange API for member transitions:
160+
161+
```typescript
162+
import { PayerToPayerAPI, MemberConsent } from './src/fhir/payer-to-payer-api';
163+
164+
// Initialize API
165+
const api = new PayerToPayerAPI({
166+
serviceBusConnectionString: process.env.AZURE_SERVICE_BUS_CONNECTION,
167+
storageConnectionString: process.env.AZURE_STORAGE_CONNECTION,
168+
storageContainerName: 'p2p-bulk-data',
169+
exportRequestTopic: 'export-requests',
170+
importRequestTopic: 'import-requests',
171+
fhirServerBaseUrl: 'https://fhir.mypayer.com',
172+
payerOrganizationId: 'PAYER001'
173+
});
174+
175+
// Register member consent
176+
await api.registerConsent({
177+
patientId: 'MEM123456',
178+
targetPayerId: 'PAYER002',
179+
consentDate: new Date(),
180+
status: 'active',
181+
authorizedResourceTypes: ['Patient', 'Claim', 'ExplanationOfBenefit']
182+
});
183+
184+
// Export patient data
185+
const result = await api.initiateExport({
186+
exportId: 'EXP-20240115-001',
187+
patientIds: ['MEM123456'],
188+
resourceTypes: ['Patient', 'Claim', 'ExplanationOfBenefit'],
189+
since: new Date('2019-01-01'), // 5-year history
190+
requestingPayerId: 'PAYER002'
191+
});
192+
```
193+
194+
**Key Capabilities:**
195+
- ✅ FHIR R4 Bulk Data Export/Import (NDJSON)
196+
- ✅ Member consent validation (opt-in flows)
197+
- ✅ Azure Service Bus async workflows
198+
- ✅ Azure Data Lake bulk file storage
199+
- ✅ PDex-compliant duplicate prevention
200+
- ✅ US Core profile validation
201+
- ✅ 5-year historical data support
202+
- ✅ Synthetic data generator for testing
203+
204+
**Generate Test Data:**
205+
```bash
206+
# Generate 100 patients with claims and encounters
207+
npm run generate:synthetic-bulk -- --count 100 --output ./test-data
208+
```
209+
210+
**Run Examples:**
211+
```bash
212+
npm run examples:p2p # Complete P2P workflow demonstration
213+
npm run test:p2p # Run 27 comprehensive tests
214+
```
215+
216+
**Documentation:** [FHIR-INTEGRATION.md](./docs/FHIR-INTEGRATION.md#payer-to-payer-data-exchange-cms-0057-f)
217+
158218
### ValueAdds277 Enhanced Claim Status
159219
Premium ECS features that save providers 7-21 minutes per lookup:
160220

0 commit comments

Comments
 (0)