@andes/fhir 1.11.1 → 1.12.0-beta.2
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/.circleci/config.yml +71 -68
- package/.editorconfig +13 -13
- package/.env.example +2 -0
- package/.github/labeler.yml +10 -10
- package/.github/pull_request_template.md +28 -28
- package/.github/workflows/build_test.yml +14 -14
- package/.github/workflows/has_conflicts.yml +13 -13
- package/.vscode/settings.json +2 -0
- package/CHANGELOG.md +312 -291
- package/LICENSE +674 -674
- package/README.md +2 -2
- package/coverage/clover.xml +198 -0
- package/coverage/coverage-final.json +5 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/config.ts.html +136 -0
- package/coverage/lcov-report/device.ts.html +193 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/index.html +116 -0
- package/coverage/lcov-report/helpers/patientFactory.ts.html +124 -0
- package/coverage/lcov-report/index.html +131 -0
- package/coverage/lcov-report/lib/config.ts.html +136 -0
- package/coverage/lcov-report/lib/device.ts.html +193 -0
- package/coverage/lcov-report/lib/index.html +146 -0
- package/coverage/lcov-report/lib/patient.ts.html +1267 -0
- package/coverage/lcov-report/patient.ts.html +1207 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -0
- package/coverage/lcov.info +410 -0
- package/dist/index.js +51 -32
- package/dist/index.js.map +1 -1
- package/dist/src/data/patient.json +191 -185
- package/dist/src/helpers/patientFactory.js +31 -0
- package/dist/src/helpers/patientFactory.js.map +1 -0
- package/dist/src/lib/allergyIntolerance.js +39 -39
- package/dist/src/lib/allergyIntolerance.js.map +1 -1
- package/dist/src/lib/bundle.js +25 -22
- package/dist/src/lib/bundle.js.map +1 -1
- package/dist/src/lib/composition.js +151 -150
- package/dist/src/lib/composition.js.map +1 -1
- package/dist/src/lib/condition.js +79 -79
- package/dist/src/lib/condition.js.map +1 -1
- package/dist/src/lib/config.js +20 -22
- package/dist/src/lib/config.js.map +1 -1
- package/dist/src/lib/config.test.js +12 -12
- package/dist/src/lib/config.test.js.map +1 -1
- package/dist/src/lib/device.js +38 -38
- package/dist/src/lib/device.js.map +1 -1
- package/dist/src/lib/device.test.js +9 -9
- package/dist/src/lib/device.test.js.map +1 -1
- package/dist/src/lib/document-reference.js +106 -103
- package/dist/src/lib/document-reference.js.map +1 -1
- package/dist/src/lib/immunization.js +67 -67
- package/dist/src/lib/medication.js +64 -64
- package/dist/src/lib/medication.js.map +1 -1
- package/dist/src/lib/medicationRequest.js +102 -99
- package/dist/src/lib/medicationRequest.js.map +1 -1
- package/dist/src/lib/medicationStatement.js +55 -55
- package/dist/src/lib/medicationStatement.js.map +1 -1
- package/dist/src/lib/organization.js +90 -90
- package/dist/src/lib/organization.js.map +1 -1
- package/dist/src/lib/patient.js +378 -360
- package/dist/src/lib/patient.js.map +1 -1
- package/dist/src/lib/patient.test.js +78 -39
- package/dist/src/lib/patient.test.js.map +1 -1
- package/dist/src/lib/practitioner.js +160 -160
- package/dist/src/lib/practitioner.js.map +1 -1
- package/index.ts +31 -31
- package/jest.config.js +11 -11
- package/package.json +45 -54
- package/release.config.js +74 -0
- package/src/data/patient.json +190 -184
- package/src/helpers/patientFactory.ts +13 -0
- package/src/lib/allergyIntolerance.ts +36 -36
- package/src/lib/bundle.ts +19 -19
- package/src/lib/composition.ts +153 -153
- package/src/lib/condition.ts +80 -80
- package/src/lib/config.test.ts +13 -13
- package/src/lib/config.ts +17 -17
- package/src/lib/device.test.ts +9 -9
- package/src/lib/device.ts +36 -36
- package/src/lib/document-reference.ts +102 -102
- package/src/lib/immunization.ts +64 -64
- package/src/lib/medication.ts +61 -61
- package/src/lib/medicationRequest.ts +100 -100
- package/src/lib/medicationStatement.ts +52 -52
- package/src/lib/organization.ts +89 -89
- package/src/lib/patient.test.ts +62 -38
- package/src/lib/patient.ts +394 -374
- package/src/lib/practitioner.ts +157 -157
- package/tsconfig.test.json +17 -17
- package/tslint.json +138 -138
package/jest.config.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
roots: ['./'],
|
|
3
|
-
transform: {
|
|
4
|
-
'^.+\\.tsx?$': 'ts-jest'
|
|
5
|
-
},
|
|
6
|
-
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
|
|
7
|
-
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
8
|
-
testEnvironment: 'node',
|
|
9
|
-
moduleNameMapper: {
|
|
10
|
-
'@andes/unit-test': '<rootDir>/packages/unit-testing/index.ts'
|
|
11
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
roots: ['./'],
|
|
3
|
+
transform: {
|
|
4
|
+
'^.+\\.tsx?$': 'ts-jest'
|
|
5
|
+
},
|
|
6
|
+
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
|
|
7
|
+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
|
|
8
|
+
testEnvironment: 'node',
|
|
9
|
+
moduleNameMapper: {
|
|
10
|
+
'@andes/unit-test': '<rootDir>/packages/unit-testing/index.ts'
|
|
11
|
+
}
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,54 +1,45 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@andes/fhir",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"repository": {
|
|
5
|
-
"type": "git",
|
|
6
|
-
"url": "https://github.com/andes/fhir.git"
|
|
7
|
-
},
|
|
8
|
-
"author": "Red TICs",
|
|
9
|
-
"license": "GPL-3.0",
|
|
10
|
-
"jest": {
|
|
11
|
-
"verbose": true
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"lint": "tslint --project .",
|
|
15
|
-
"start": "node index.js",
|
|
16
|
-
"tsc": "tsc",
|
|
17
|
-
"test": "npx jest --coverage",
|
|
18
|
-
"tsc:w": "tsc -w",
|
|
19
|
-
"prepublishOnly": "
|
|
20
|
-
"semantic-release": "semantic-release"
|
|
21
|
-
},
|
|
22
|
-
"main": "./dist/index.js",
|
|
23
|
-
"devDependencies": {
|
|
24
|
-
"@semantic-release/changelog": "^
|
|
25
|
-
"@semantic-release/git": "^
|
|
26
|
-
"@types/jest": "^26.0.
|
|
27
|
-
"@types/
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"jasmine-
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"@semantic-release/commit-analyzer",
|
|
47
|
-
"@semantic-release/release-notes-generator",
|
|
48
|
-
"@semantic-release/changelog",
|
|
49
|
-
"@semantic-release/npm",
|
|
50
|
-
"@semantic-release/git",
|
|
51
|
-
"@semantic-release/github"
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@andes/fhir",
|
|
3
|
+
"version": "1.12.0-beta.2",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/andes/fhir.git"
|
|
7
|
+
},
|
|
8
|
+
"author": "Red TICs",
|
|
9
|
+
"license": "GPL-3.0",
|
|
10
|
+
"jest": {
|
|
11
|
+
"verbose": true
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"lint": "tslint --project .",
|
|
15
|
+
"start": "node index.js",
|
|
16
|
+
"tsc": "tsc",
|
|
17
|
+
"test": "npx jest --coverage",
|
|
18
|
+
"tsc:w": "tsc -w",
|
|
19
|
+
"prepublishOnly": "rimraf dist && tsc -p ./ --outDir dist/",
|
|
20
|
+
"semantic-release": "semantic-release"
|
|
21
|
+
},
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
25
|
+
"@semantic-release/git": "^10.0.1",
|
|
26
|
+
"@types/jest": "^26.0.24",
|
|
27
|
+
"@types/node": "^6.0.117",
|
|
28
|
+
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
29
|
+
"dotenv-cli": "^11.0.0",
|
|
30
|
+
"jasmine-core": "~2.6.2",
|
|
31
|
+
"jasmine-spec-reporter": "~4.1.0",
|
|
32
|
+
"jest": "^26.6.3",
|
|
33
|
+
"rimraf": "^6.1.0",
|
|
34
|
+
"semantic-release": "^24.2.9",
|
|
35
|
+
"ts-jest": "^26.5.4",
|
|
36
|
+
"ts-node": "~3.0.4",
|
|
37
|
+
"tslint": "^5.20.1",
|
|
38
|
+
"tslint-eslint-rules": "^5.4.0",
|
|
39
|
+
"typescript": "^3.9.9"
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@jest/types": "^26.6.2",
|
|
43
|
+
"moment": ">=2.29.4"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
// release.config.js
|
|
2
|
+
module.exports = {
|
|
3
|
+
branches: [
|
|
4
|
+
// 🔹 Rama principal: versión estable
|
|
5
|
+
{ name: 'master' },
|
|
6
|
+
|
|
7
|
+
// 🔹 Rama de desarrollo: pre-release "beta"
|
|
8
|
+
{ name: 'develop', channel: 'beta', prerelease: 'beta' }
|
|
9
|
+
],
|
|
10
|
+
|
|
11
|
+
// Repositorio en GitHub
|
|
12
|
+
repositoryUrl: 'https://github.com/andes/fhir.git',
|
|
13
|
+
|
|
14
|
+
plugins: [
|
|
15
|
+
// 1️⃣ Analiza commits según Conv. Commits
|
|
16
|
+
[
|
|
17
|
+
'@semantic-release/commit-analyzer',
|
|
18
|
+
{
|
|
19
|
+
preset: 'conventionalcommits',
|
|
20
|
+
releaseRules: [
|
|
21
|
+
{ type: 'docs', scope: 'README', release: 'patch' },
|
|
22
|
+
{ type: 'refactor', release: 'patch' },
|
|
23
|
+
{ type: 'chore', release: false }
|
|
24
|
+
],
|
|
25
|
+
parserOpts: {
|
|
26
|
+
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES']
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
|
|
31
|
+
// 2️⃣ Genera notas de release automáticamente
|
|
32
|
+
'@semantic-release/release-notes-generator',
|
|
33
|
+
|
|
34
|
+
// 3️⃣ Actualiza el changelog solo en master
|
|
35
|
+
[
|
|
36
|
+
'@semantic-release/changelog',
|
|
37
|
+
{
|
|
38
|
+
changelogFile: 'CHANGELOG.md',
|
|
39
|
+
changelogTitle: '# Changelog'
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
|
|
43
|
+
// 4️⃣ Publica el paquete en npm
|
|
44
|
+
[
|
|
45
|
+
'@semantic-release/npm',
|
|
46
|
+
{
|
|
47
|
+
npmPublish: true,
|
|
48
|
+
pkgRoot: '.'
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
|
|
52
|
+
// 5️⃣ Actualiza package.json y changelog solo en master
|
|
53
|
+
[
|
|
54
|
+
'@semantic-release/git',
|
|
55
|
+
{
|
|
56
|
+
assets: ['package.json', 'CHANGELOG.md'],
|
|
57
|
+
message:
|
|
58
|
+
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
|
|
62
|
+
// 6️⃣ Publica release en GitHub (tags, changelog, etc.)
|
|
63
|
+
[
|
|
64
|
+
'@semantic-release/github',
|
|
65
|
+
{
|
|
66
|
+
successComment: false,
|
|
67
|
+
failComment: false,
|
|
68
|
+
assets: [
|
|
69
|
+
{ path: 'CHANGELOG.md', label: '📘 Changelog' }
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
]
|
|
74
|
+
};
|
package/src/data/patient.json
CHANGED
|
@@ -1,185 +1,191 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_id": "58d30d6fgbb1a96b254d9877",
|
|
3
|
-
"entidadesValidadoras": [
|
|
4
|
-
"RENAPER",
|
|
5
|
-
"Sisa"
|
|
6
|
-
],
|
|
7
|
-
"documento": "42910660",
|
|
8
|
-
"apellido": "PERINGA PONCE",
|
|
9
|
-
"nombre": "HUGO AGUSTIN",
|
|
10
|
-
"sexo": "masculino",
|
|
11
|
-
"fechaNacimiento": "1979-11-14T03:00:00.000-03:00",
|
|
12
|
-
"estado": "validado",
|
|
13
|
-
"genero": "masculino",
|
|
14
|
-
"financiador": [
|
|
15
|
-
{
|
|
16
|
-
"codigoPuco": 921001,
|
|
17
|
-
"nombre": "O.S.P. NEUQUEN",
|
|
18
|
-
"financiador": "O.S.P. NEUQUEN"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"codigoPuco": 921001,
|
|
22
|
-
"nombre": "O.S.P. NEUQUEN",
|
|
23
|
-
"financiador": "O.S.P. NEUQUEN"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"relaciones": [
|
|
27
|
-
{
|
|
28
|
-
"_id": "5b92dec9646d99436065cbfc",
|
|
29
|
-
"relacion": {
|
|
30
|
-
"_id": "59247c391ebf0273353b23c0",
|
|
31
|
-
"nombre": "hijo/a",
|
|
32
|
-
"opuesto": "progenitor/a"
|
|
33
|
-
},
|
|
34
|
-
"referencia": "5b92de583173b053ae88f2d0",
|
|
35
|
-
"nombre": "JOSEFINA",
|
|
36
|
-
"apellido": "PERINGA PONCE",
|
|
37
|
-
"documento": "333333333",
|
|
38
|
-
"fotoId": "5f9072d00254f253d9c7dd54"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"_id": "5b92dec9646d99436065cbfa",
|
|
42
|
-
"relacion": {
|
|
43
|
-
"_id": "59247c391ebf0273353b23c0",
|
|
44
|
-
"nombre": "hijo/a",
|
|
45
|
-
"opuesto": "progenitor/a"
|
|
46
|
-
},
|
|
47
|
-
"referencia": "5b9287f10394a225c25a150b",
|
|
48
|
-
"nombre": "IGNACIO",
|
|
49
|
-
"apellido": "PERINGA PONCE",
|
|
50
|
-
"documento": "222222222",
|
|
51
|
-
"fotoId": "5f9072d00254f253d9c7dd2c"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"_id": "5f00d31e044ef317c36fd4f8",
|
|
55
|
-
"relacion": {
|
|
56
|
-
"_id": "59247c391ebf0273353b23c0",
|
|
57
|
-
"nombre": "hijo/a",
|
|
58
|
-
"opuesto": "progenitor/a"
|
|
59
|
-
},
|
|
60
|
-
"referencia": "5f00d2f7acfe3a7e46a88227",
|
|
61
|
-
"nombre": "JUAN CRUZ",
|
|
62
|
-
"apellido": "PERINGA PONCE",
|
|
63
|
-
"documento": "11111111",
|
|
64
|
-
"fotoId": "5f9078ff0254f253d9dc7212"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"_id": "5f09f00d5cec191aa5908457",
|
|
68
|
-
"relacion": {
|
|
69
|
-
"_id": "59247e1c1ebf0273353b23c5",
|
|
70
|
-
"nombre": "otro",
|
|
71
|
-
"opuesto": "otro"
|
|
72
|
-
},
|
|
73
|
-
"referencia": "59cb176acd21ce293061b67b",
|
|
74
|
-
"nombre": "FLORENCIA INES",
|
|
75
|
-
"apellido": "YAMIL",
|
|
76
|
-
"documento": "15365478",
|
|
77
|
-
"fotoId": "5f9072b40254f253d9c79556"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"direccion": [
|
|
81
|
-
{
|
|
82
|
-
"geoReferencia": [
|
|
83
|
-
-38.9305707,
|
|
84
|
-
-68.0839758
|
|
85
|
-
],
|
|
86
|
-
"activo": true,
|
|
87
|
-
"_id": "58d90d6f0bb1a96b254d9878",
|
|
88
|
-
"valor": "Enrique Santos Discepolo 1856",
|
|
89
|
-
"codigoPostal": "8300",
|
|
90
|
-
"ubicacion": {
|
|
91
|
-
"_id": "58d90d6f0bb1a96b254d9879",
|
|
92
|
-
"pais": {
|
|
93
|
-
"_id": "57f3b5c469fe79a598e6281f",
|
|
94
|
-
"nombre": "Argentina"
|
|
95
|
-
},
|
|
96
|
-
"provincia": {
|
|
97
|
-
"_id": "57f3f3aacebd681cc2014c53",
|
|
98
|
-
"nombre": "Neuquén"
|
|
99
|
-
},
|
|
100
|
-
"localidad": {
|
|
101
|
-
"_id": "57f538a472325875a199a82d",
|
|
102
|
-
"nombre": "NEUQUEN"
|
|
103
|
-
},
|
|
104
|
-
"barrio": null
|
|
105
|
-
},
|
|
106
|
-
"ranking": 0,
|
|
107
|
-
"ultimaActualizacion": "2017-03-27T10:02:16.809-03:00"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"geoReferencia": null,
|
|
111
|
-
"activo": true,
|
|
112
|
-
"_id": "6046105ba4e2d85f81ad60f7",
|
|
113
|
-
"valor": "NORDENSTROM 1898 0 0",
|
|
114
|
-
"codigoPostal": "8300",
|
|
115
|
-
"ranking": 1,
|
|
116
|
-
"ubicacion": {
|
|
117
|
-
"_id": "6046105ba4e2d85f81ad60f8",
|
|
118
|
-
"pais": {
|
|
119
|
-
"_id": "57f3b5c469fe79a598e6281f",
|
|
120
|
-
"nombre": "Argentina"
|
|
121
|
-
},
|
|
122
|
-
"provincia": {
|
|
123
|
-
"_id": "57f3f3aacebd681cc2014c53",
|
|
124
|
-
"nombre": "Neuquén"
|
|
125
|
-
},
|
|
126
|
-
"localidad": {
|
|
127
|
-
"_id": "57f538a472325875a199a82d",
|
|
128
|
-
"nombre": "Neuquén"
|
|
129
|
-
},
|
|
130
|
-
"barrio": null
|
|
131
|
-
},
|
|
132
|
-
"ultimaActualizacion": "2021-03-08T08:54:04.089-03:00"
|
|
133
|
-
}
|
|
134
|
-
],
|
|
135
|
-
"contacto": [
|
|
136
|
-
{
|
|
137
|
-
"activo": true,
|
|
138
|
-
"_id": "5cabf8cc129519c9cd5bf6f2",
|
|
139
|
-
"tipo": "celular",
|
|
140
|
-
"valor": "4462221"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"activo": true,
|
|
144
|
-
"_id": "5cabf8cc129519c9cd5bf6f1",
|
|
145
|
-
"tipo": "email",
|
|
146
|
-
"valor": "hugoperingaponce@gmail.com"
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"identificadores": [
|
|
150
|
-
{
|
|
151
|
-
"entidad": "RENAPER",
|
|
152
|
-
"valor": "241654536"
|
|
153
|
-
}
|
|
154
|
-
],
|
|
155
|
-
"estadoCivil": "soltero",
|
|
156
|
-
"reportarError": false,
|
|
157
|
-
"scan": "27381849",
|
|
158
|
-
"carpetaEfectores": [
|
|
159
|
-
{
|
|
160
|
-
"_id": "5992e06a0e3f6446112e9bd5",
|
|
161
|
-
"organizacion": {
|
|
162
|
-
"_id": "59650203d03019f919ea31ed",
|
|
163
|
-
"nombre": "CENTRO DE SALUD PARQUE INDUSTRIAL"
|
|
164
|
-
},
|
|
165
|
-
"nroCarpeta": ""
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"_id": "5b57565dc0202168d3d5762d",
|
|
169
|
-
"organizacion": {
|
|
170
|
-
"_id": "57e9670e52df311059bc8964",
|
|
171
|
-
"nombre": "HOSPITAL PROVINCIAL NEUQUEN - DR. EDUARDO CASTRO RENDON"
|
|
172
|
-
},
|
|
173
|
-
"nroCarpeta": "PDR27381849"
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"notas": [],
|
|
177
|
-
"cuil": "23273818499",
|
|
178
|
-
"foto": null,
|
|
179
|
-
"activo": true,
|
|
180
|
-
"notaError": "",
|
|
181
|
-
"tipoIdentificacion": null,
|
|
182
|
-
"fotoId": "6046105c18944f849e9fe315",
|
|
183
|
-
"documentos": [],
|
|
184
|
-
"fechaFallecimiento": null
|
|
1
|
+
{
|
|
2
|
+
"_id": "58d30d6fgbb1a96b254d9877",
|
|
3
|
+
"entidadesValidadoras": [
|
|
4
|
+
"RENAPER",
|
|
5
|
+
"Sisa"
|
|
6
|
+
],
|
|
7
|
+
"documento": "42910660",
|
|
8
|
+
"apellido": "PERINGA PONCE",
|
|
9
|
+
"nombre": "HUGO AGUSTIN",
|
|
10
|
+
"sexo": "masculino",
|
|
11
|
+
"fechaNacimiento": "1979-11-14T03:00:00.000-03:00",
|
|
12
|
+
"estado": "validado",
|
|
13
|
+
"genero": "masculino",
|
|
14
|
+
"financiador": [
|
|
15
|
+
{
|
|
16
|
+
"codigoPuco": 921001,
|
|
17
|
+
"nombre": "O.S.P. NEUQUEN",
|
|
18
|
+
"financiador": "O.S.P. NEUQUEN"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"codigoPuco": 921001,
|
|
22
|
+
"nombre": "O.S.P. NEUQUEN",
|
|
23
|
+
"financiador": "O.S.P. NEUQUEN"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"relaciones": [
|
|
27
|
+
{
|
|
28
|
+
"_id": "5b92dec9646d99436065cbfc",
|
|
29
|
+
"relacion": {
|
|
30
|
+
"_id": "59247c391ebf0273353b23c0",
|
|
31
|
+
"nombre": "hijo/a",
|
|
32
|
+
"opuesto": "progenitor/a"
|
|
33
|
+
},
|
|
34
|
+
"referencia": "5b92de583173b053ae88f2d0",
|
|
35
|
+
"nombre": "JOSEFINA",
|
|
36
|
+
"apellido": "PERINGA PONCE",
|
|
37
|
+
"documento": "333333333",
|
|
38
|
+
"fotoId": "5f9072d00254f253d9c7dd54"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"_id": "5b92dec9646d99436065cbfa",
|
|
42
|
+
"relacion": {
|
|
43
|
+
"_id": "59247c391ebf0273353b23c0",
|
|
44
|
+
"nombre": "hijo/a",
|
|
45
|
+
"opuesto": "progenitor/a"
|
|
46
|
+
},
|
|
47
|
+
"referencia": "5b9287f10394a225c25a150b",
|
|
48
|
+
"nombre": "IGNACIO",
|
|
49
|
+
"apellido": "PERINGA PONCE",
|
|
50
|
+
"documento": "222222222",
|
|
51
|
+
"fotoId": "5f9072d00254f253d9c7dd2c"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"_id": "5f00d31e044ef317c36fd4f8",
|
|
55
|
+
"relacion": {
|
|
56
|
+
"_id": "59247c391ebf0273353b23c0",
|
|
57
|
+
"nombre": "hijo/a",
|
|
58
|
+
"opuesto": "progenitor/a"
|
|
59
|
+
},
|
|
60
|
+
"referencia": "5f00d2f7acfe3a7e46a88227",
|
|
61
|
+
"nombre": "JUAN CRUZ",
|
|
62
|
+
"apellido": "PERINGA PONCE",
|
|
63
|
+
"documento": "11111111",
|
|
64
|
+
"fotoId": "5f9078ff0254f253d9dc7212"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"_id": "5f09f00d5cec191aa5908457",
|
|
68
|
+
"relacion": {
|
|
69
|
+
"_id": "59247e1c1ebf0273353b23c5",
|
|
70
|
+
"nombre": "otro",
|
|
71
|
+
"opuesto": "otro"
|
|
72
|
+
},
|
|
73
|
+
"referencia": "59cb176acd21ce293061b67b",
|
|
74
|
+
"nombre": "FLORENCIA INES",
|
|
75
|
+
"apellido": "YAMIL",
|
|
76
|
+
"documento": "15365478",
|
|
77
|
+
"fotoId": "5f9072b40254f253d9c79556"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"direccion": [
|
|
81
|
+
{
|
|
82
|
+
"geoReferencia": [
|
|
83
|
+
-38.9305707,
|
|
84
|
+
-68.0839758
|
|
85
|
+
],
|
|
86
|
+
"activo": true,
|
|
87
|
+
"_id": "58d90d6f0bb1a96b254d9878",
|
|
88
|
+
"valor": "Enrique Santos Discepolo 1856",
|
|
89
|
+
"codigoPostal": "8300",
|
|
90
|
+
"ubicacion": {
|
|
91
|
+
"_id": "58d90d6f0bb1a96b254d9879",
|
|
92
|
+
"pais": {
|
|
93
|
+
"_id": "57f3b5c469fe79a598e6281f",
|
|
94
|
+
"nombre": "Argentina"
|
|
95
|
+
},
|
|
96
|
+
"provincia": {
|
|
97
|
+
"_id": "57f3f3aacebd681cc2014c53",
|
|
98
|
+
"nombre": "Neuquén"
|
|
99
|
+
},
|
|
100
|
+
"localidad": {
|
|
101
|
+
"_id": "57f538a472325875a199a82d",
|
|
102
|
+
"nombre": "NEUQUEN"
|
|
103
|
+
},
|
|
104
|
+
"barrio": null
|
|
105
|
+
},
|
|
106
|
+
"ranking": 0,
|
|
107
|
+
"ultimaActualizacion": "2017-03-27T10:02:16.809-03:00"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"geoReferencia": null,
|
|
111
|
+
"activo": true,
|
|
112
|
+
"_id": "6046105ba4e2d85f81ad60f7",
|
|
113
|
+
"valor": "NORDENSTROM 1898 0 0",
|
|
114
|
+
"codigoPostal": "8300",
|
|
115
|
+
"ranking": 1,
|
|
116
|
+
"ubicacion": {
|
|
117
|
+
"_id": "6046105ba4e2d85f81ad60f8",
|
|
118
|
+
"pais": {
|
|
119
|
+
"_id": "57f3b5c469fe79a598e6281f",
|
|
120
|
+
"nombre": "Argentina"
|
|
121
|
+
},
|
|
122
|
+
"provincia": {
|
|
123
|
+
"_id": "57f3f3aacebd681cc2014c53",
|
|
124
|
+
"nombre": "Neuquén"
|
|
125
|
+
},
|
|
126
|
+
"localidad": {
|
|
127
|
+
"_id": "57f538a472325875a199a82d",
|
|
128
|
+
"nombre": "Neuquén"
|
|
129
|
+
},
|
|
130
|
+
"barrio": null
|
|
131
|
+
},
|
|
132
|
+
"ultimaActualizacion": "2021-03-08T08:54:04.089-03:00"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"contacto": [
|
|
136
|
+
{
|
|
137
|
+
"activo": true,
|
|
138
|
+
"_id": "5cabf8cc129519c9cd5bf6f2",
|
|
139
|
+
"tipo": "celular",
|
|
140
|
+
"valor": "4462221"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"activo": true,
|
|
144
|
+
"_id": "5cabf8cc129519c9cd5bf6f1",
|
|
145
|
+
"tipo": "email",
|
|
146
|
+
"valor": "hugoperingaponce@gmail.com"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"identificadores": [
|
|
150
|
+
{
|
|
151
|
+
"entidad": "RENAPER",
|
|
152
|
+
"valor": "241654536"
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"estadoCivil": "soltero",
|
|
156
|
+
"reportarError": false,
|
|
157
|
+
"scan": "27381849",
|
|
158
|
+
"carpetaEfectores": [
|
|
159
|
+
{
|
|
160
|
+
"_id": "5992e06a0e3f6446112e9bd5",
|
|
161
|
+
"organizacion": {
|
|
162
|
+
"_id": "59650203d03019f919ea31ed",
|
|
163
|
+
"nombre": "CENTRO DE SALUD PARQUE INDUSTRIAL"
|
|
164
|
+
},
|
|
165
|
+
"nroCarpeta": ""
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"_id": "5b57565dc0202168d3d5762d",
|
|
169
|
+
"organizacion": {
|
|
170
|
+
"_id": "57e9670e52df311059bc8964",
|
|
171
|
+
"nombre": "HOSPITAL PROVINCIAL NEUQUEN - DR. EDUARDO CASTRO RENDON"
|
|
172
|
+
},
|
|
173
|
+
"nroCarpeta": "PDR27381849"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"notas": [],
|
|
177
|
+
"cuil": "23273818499",
|
|
178
|
+
"foto": null,
|
|
179
|
+
"activo": true,
|
|
180
|
+
"notaError": "",
|
|
181
|
+
"tipoIdentificacion": null,
|
|
182
|
+
"fotoId": "6046105c18944f849e9fe315",
|
|
183
|
+
"documentos": [],
|
|
184
|
+
"fechaFallecimiento": null,
|
|
185
|
+
"createdBy": {
|
|
186
|
+
"organizacion": {
|
|
187
|
+
"id": "50580352367779",
|
|
188
|
+
"nombre": "LABORATORIO RAÑA - SERVICIOS MEDICOS"
|
|
189
|
+
}
|
|
190
|
+
}
|
|
185
191
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as basePatient from '../data/patient.json';
|
|
2
|
+
|
|
3
|
+
export type PartialDeep<T> = {
|
|
4
|
+
[K in keyof T]?: T[K] extends object ? PartialDeep<T[K]> : T[K];
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export const createPatient = (overrides: PartialDeep<typeof basePatient> = {}) => {
|
|
8
|
+
const clone = JSON.parse(JSON.stringify(basePatient));
|
|
9
|
+
return {
|
|
10
|
+
...clone,
|
|
11
|
+
...overrides,
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Encode de Alergias e Intolerancias from ANDES to FHIR
|
|
3
|
-
* @param {} AllergyIntolerance
|
|
4
|
-
*/
|
|
5
|
-
export function encode(patientReference, alergiaIntolerancia) {
|
|
6
|
-
return {
|
|
7
|
-
category: [
|
|
8
|
-
'medication'
|
|
9
|
-
],
|
|
10
|
-
criticality: 'high',
|
|
11
|
-
patient: {
|
|
12
|
-
reference: patientReference
|
|
13
|
-
},
|
|
14
|
-
id: alergiaIntolerancia._id,
|
|
15
|
-
code: {
|
|
16
|
-
coding: [
|
|
17
|
-
{
|
|
18
|
-
system: 'http://snomed.info/sct',
|
|
19
|
-
display: alergiaIntolerancia.concepto.term,
|
|
20
|
-
code: alergiaIntolerancia.concepto.conceptId,
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
meta: {
|
|
25
|
-
profile: ['http://hl7.org/fhir/uv/ips/StructureDefinition/allergyintolerance-uv-ips']
|
|
26
|
-
},
|
|
27
|
-
text: {
|
|
28
|
-
status: 'generated',
|
|
29
|
-
div: `<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: Alergia </p><p><b>meta</b>: </p><p><b>text</b>: ${alergiaIntolerancia.concepto.semanticTag}</p></div>`
|
|
30
|
-
},
|
|
31
|
-
resourceType: 'AllergyIntolerance',
|
|
32
|
-
type: 'allergy',
|
|
33
|
-
onsetDateTime: alergiaIntolerancia.valor.fechaInicio
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Encode de Alergias e Intolerancias from ANDES to FHIR
|
|
3
|
+
* @param {} AllergyIntolerance
|
|
4
|
+
*/
|
|
5
|
+
export function encode(patientReference, alergiaIntolerancia) {
|
|
6
|
+
return {
|
|
7
|
+
category: [
|
|
8
|
+
'medication'
|
|
9
|
+
],
|
|
10
|
+
criticality: 'high',
|
|
11
|
+
patient: {
|
|
12
|
+
reference: patientReference
|
|
13
|
+
},
|
|
14
|
+
id: alergiaIntolerancia._id,
|
|
15
|
+
code: {
|
|
16
|
+
coding: [
|
|
17
|
+
{
|
|
18
|
+
system: 'http://snomed.info/sct',
|
|
19
|
+
display: alergiaIntolerancia.concepto.term,
|
|
20
|
+
code: alergiaIntolerancia.concepto.conceptId,
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
meta: {
|
|
25
|
+
profile: ['http://hl7.org/fhir/uv/ips/StructureDefinition/allergyintolerance-uv-ips']
|
|
26
|
+
},
|
|
27
|
+
text: {
|
|
28
|
+
status: 'generated',
|
|
29
|
+
div: `<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: Alergia </p><p><b>meta</b>: </p><p><b>text</b>: ${alergiaIntolerancia.concepto.semanticTag}</p></div>`
|
|
30
|
+
},
|
|
31
|
+
resourceType: 'AllergyIntolerance',
|
|
32
|
+
type: 'allergy',
|
|
33
|
+
onsetDateTime: alergiaIntolerancia.valor.fechaInicio
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|