@aurabx/jmix-js 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.
- package/.ai/security.md +184 -0
- package/.eslintrc.cjs +23 -0
- package/.idea/jmix-ts.iml +13 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierrc +9 -0
- package/README.md +335 -0
- package/WARP.md +143 -0
- package/dist/JmixBuilder.d.ts +82 -0
- package/dist/JmixBuilder.d.ts.map +1 -0
- package/dist/JmixBuilder.js +353 -0
- package/dist/JmixBuilder.js.map +1 -0
- package/dist/crypto/PayloadDecryptor.d.ts +12 -0
- package/dist/crypto/PayloadDecryptor.d.ts.map +1 -0
- package/dist/crypto/PayloadDecryptor.js +39 -0
- package/dist/crypto/PayloadDecryptor.js.map +1 -0
- package/dist/crypto/PayloadEncryptor.d.ts +21 -0
- package/dist/crypto/PayloadEncryptor.d.ts.map +1 -0
- package/dist/crypto/PayloadEncryptor.js +79 -0
- package/dist/crypto/PayloadEncryptor.js.map +1 -0
- package/dist/demo-decrypt-existing.js +27 -0
- package/dist/demo-decrypt.js +39 -0
- package/dist/demo-no-validation.js +95 -0
- package/dist/demo-package-encrypted.js +34 -0
- package/dist/demo-package.js +28 -0
- package/dist/demo-verify-hash.js +30 -0
- package/dist/demo.js +73 -0
- package/dist/dicom/DicomProcessor.d.ts +40 -0
- package/dist/dicom/DicomProcessor.d.ts.map +1 -0
- package/dist/dicom/DicomProcessor.js +231 -0
- package/dist/dicom/DicomProcessor.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.d.ts +165 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +31 -0
- package/dist/types/index.js.map +1 -0
- package/dist/validation/SchemaValidator.d.ts +25 -0
- package/dist/validation/SchemaValidator.d.ts.map +1 -0
- package/dist/validation/SchemaValidator.js +125 -0
- package/dist/validation/SchemaValidator.js.map +1 -0
- package/jest.config.json +20 -0
- package/package.json +74 -0
- package/samples/sample_config.json +52 -0
- package/samples/study_1/series_1/CT.1.1.dcm +0 -0
- package/samples/study_1/series_1/CT.1.2.dcm +0 -0
- package/samples/study_1/series_1/CT.1.3.dcm +0 -0
- package/samples/study_1/series_1/CT.1.4.dcm +0 -0
- package/samples/study_1/series_1/CT.1.5.dcm +0 -0
- package/samples/study_1/series_2/CT.2.1.dcm +0 -0
- package/samples/study_1/series_2/CT.2.2.dcm +0 -0
- package/samples/study_1/series_2/CT.2.3.dcm +0 -0
- package/samples/study_1/series_2/CT.2.4.dcm +0 -0
- package/samples/study_1/series_2/CT.2.5.dcm +0 -0
- package/samples/study_1/series_3/CT.3.1.dcm +0 -0
- package/samples/study_1/series_3/CT.3.2.dcm +0 -0
- package/samples/study_1/series_3/CT.3.3.dcm +0 -0
- package/samples/study_1/series_3/CT.3.4.dcm +0 -0
- package/samples/study_1/series_3/CT.3.5.dcm +0 -0
- package/src/JmixBuilder.ts +572 -0
- package/src/crypto/PayloadDecryptor.ts +45 -0
- package/src/crypto/PayloadEncryptor.ts +97 -0
- package/src/dicom/DicomProcessor.ts +262 -0
- package/src/index.ts +30 -0
- package/src/types/daikon.d.ts +1 -0
- package/src/types/index.ts +201 -0
- package/src/validation/SchemaValidator.ts +156 -0
- package/test-encrypt.js +10 -0
- package/tests/JmixBuilder.test.ts +170 -0
- package/tests/SchemaValidator.test.ts +196 -0
- package/tsconfig.json +21 -0
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aurabx/jmix-js",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "TypeScript implementation of JMIX (JSON Medical Interchange) format for secure medical data exchange",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"test:watch": "jest --watch",
|
|
19
|
+
"test:coverage": "jest --coverage",
|
|
20
|
+
"lint": "echo 'Linting skipped - TypeScript checking handled by tsc'",
|
|
21
|
+
"lint:fix": "echo 'Lint fix skipped - use prettier for formatting'",
|
|
22
|
+
"format": "prettier --check .",
|
|
23
|
+
"format:fix": "prettier --write .",
|
|
24
|
+
"clean": "rimraf dist ./tmp",
|
|
25
|
+
"keys:gen": "node -e \"const n=require('tweetnacl');const kp=n.box.keyPair();console.log(Buffer.from(kp.publicKey).toString('base64'))\"",
|
|
26
|
+
"demo:package": "node dist/demo-package.js ./samples/study_1 ./tmp",
|
|
27
|
+
"demo:package:encrypted": "node dist/demo-package-encrypted.js",
|
|
28
|
+
"demo:decrypt": "node dist/demo-decrypt.js ./samples/study_1 ./tmp",
|
|
29
|
+
"demo:decrypt:existing": "node dist/demo-decrypt-existing.js",
|
|
30
|
+
"demo:verify:hash": "node dist/demo-verify-hash.js"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"ajv": "^8.12.0",
|
|
34
|
+
"ajv-formats": "^2.1.1",
|
|
35
|
+
"daikon": "^1.2.0",
|
|
36
|
+
"tar-stream": "^3.1.7",
|
|
37
|
+
"tweetnacl": "^1.0.3",
|
|
38
|
+
"tar": "^6.2.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@types/jest": "^29.5.0",
|
|
42
|
+
"@types/node": "^20.0.0",
|
|
43
|
+
"@types/tar-stream": "^2.2.2",
|
|
44
|
+
"@types/tar": "^6.1.5",
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
46
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
47
|
+
"eslint": "^8.0.0",
|
|
48
|
+
"jest": "^29.0.0",
|
|
49
|
+
"prettier": "^3.0.0",
|
|
50
|
+
"rimraf": "^5.0.0",
|
|
51
|
+
"ts-jest": "^29.0.0",
|
|
52
|
+
"ts-node": "^10.9.2",
|
|
53
|
+
"typescript": "^5.5.3"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=20.0.0"
|
|
57
|
+
},
|
|
58
|
+
"directories": {
|
|
59
|
+
"test": "tests"
|
|
60
|
+
},
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/aurabx/jmix-js.git"
|
|
64
|
+
},
|
|
65
|
+
"keywords": [
|
|
66
|
+
"jmix"
|
|
67
|
+
],
|
|
68
|
+
"author": "aurabox",
|
|
69
|
+
"license": "MIT",
|
|
70
|
+
"bugs": {
|
|
71
|
+
"url": "https://github.com/aurabx/jmix-js/issues"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://github.com/aurabx/jmix-js#readme"
|
|
74
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "1.0",
|
|
3
|
+
"sender": {
|
|
4
|
+
"name": "Test Healthcare Organization",
|
|
5
|
+
"id": "org:test.health.123",
|
|
6
|
+
"contact": "sender@test-health.org"
|
|
7
|
+
},
|
|
8
|
+
"requester": {
|
|
9
|
+
"name": "Dr. Jane Smith",
|
|
10
|
+
"id": "doc:jane.smith",
|
|
11
|
+
"contact": {
|
|
12
|
+
"system": "email",
|
|
13
|
+
"value": "jane.smith@test-clinic.org"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"receivers": [
|
|
17
|
+
{
|
|
18
|
+
"name": "Receiving Clinic",
|
|
19
|
+
"id": "org:receiver.clinic",
|
|
20
|
+
"contact": {
|
|
21
|
+
"system": "phone",
|
|
22
|
+
"value": "+61-2-9999-8888"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"patient": {
|
|
27
|
+
"name": "John Doe",
|
|
28
|
+
"id": "PAT12345",
|
|
29
|
+
"dob": "1985-03-15",
|
|
30
|
+
"sex": "M",
|
|
31
|
+
"identifiers": [
|
|
32
|
+
{
|
|
33
|
+
"system": "http://ns.electronichealth.net.au/id/hi/ihi/1.0",
|
|
34
|
+
"value": "8003608166690503",
|
|
35
|
+
"use_field": "official"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"security": {
|
|
40
|
+
"classification": "confidential"
|
|
41
|
+
},
|
|
42
|
+
"custom_tags": ["radiology", "urgent"],
|
|
43
|
+
"report": {
|
|
44
|
+
"file": "files/radiology-report.pdf"
|
|
45
|
+
},
|
|
46
|
+
"consent": {
|
|
47
|
+
"status": "granted",
|
|
48
|
+
"scope": ["treatment", "research"],
|
|
49
|
+
"method": "digital-signature"
|
|
50
|
+
},
|
|
51
|
+
"deid_keys": ["PatientName", "PatientID"]
|
|
52
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|