@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.
Files changed (94) hide show
  1. package/.circleci/config.yml +71 -68
  2. package/.editorconfig +13 -13
  3. package/.env.example +2 -0
  4. package/.github/labeler.yml +10 -10
  5. package/.github/pull_request_template.md +28 -28
  6. package/.github/workflows/build_test.yml +14 -14
  7. package/.github/workflows/has_conflicts.yml +13 -13
  8. package/.vscode/settings.json +2 -0
  9. package/CHANGELOG.md +312 -291
  10. package/LICENSE +674 -674
  11. package/README.md +2 -2
  12. package/coverage/clover.xml +198 -0
  13. package/coverage/coverage-final.json +5 -0
  14. package/coverage/lcov-report/base.css +224 -0
  15. package/coverage/lcov-report/block-navigation.js +87 -0
  16. package/coverage/lcov-report/config.ts.html +136 -0
  17. package/coverage/lcov-report/device.ts.html +193 -0
  18. package/coverage/lcov-report/favicon.png +0 -0
  19. package/coverage/lcov-report/helpers/index.html +116 -0
  20. package/coverage/lcov-report/helpers/patientFactory.ts.html +124 -0
  21. package/coverage/lcov-report/index.html +131 -0
  22. package/coverage/lcov-report/lib/config.ts.html +136 -0
  23. package/coverage/lcov-report/lib/device.ts.html +193 -0
  24. package/coverage/lcov-report/lib/index.html +146 -0
  25. package/coverage/lcov-report/lib/patient.ts.html +1267 -0
  26. package/coverage/lcov-report/patient.ts.html +1207 -0
  27. package/coverage/lcov-report/prettify.css +1 -0
  28. package/coverage/lcov-report/prettify.js +2 -0
  29. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  30. package/coverage/lcov-report/sorter.js +210 -0
  31. package/coverage/lcov.info +410 -0
  32. package/dist/index.js +51 -32
  33. package/dist/index.js.map +1 -1
  34. package/dist/src/data/patient.json +191 -185
  35. package/dist/src/helpers/patientFactory.js +31 -0
  36. package/dist/src/helpers/patientFactory.js.map +1 -0
  37. package/dist/src/lib/allergyIntolerance.js +39 -39
  38. package/dist/src/lib/allergyIntolerance.js.map +1 -1
  39. package/dist/src/lib/bundle.js +25 -22
  40. package/dist/src/lib/bundle.js.map +1 -1
  41. package/dist/src/lib/composition.js +151 -150
  42. package/dist/src/lib/composition.js.map +1 -1
  43. package/dist/src/lib/condition.js +79 -79
  44. package/dist/src/lib/condition.js.map +1 -1
  45. package/dist/src/lib/config.js +20 -22
  46. package/dist/src/lib/config.js.map +1 -1
  47. package/dist/src/lib/config.test.js +12 -12
  48. package/dist/src/lib/config.test.js.map +1 -1
  49. package/dist/src/lib/device.js +38 -38
  50. package/dist/src/lib/device.js.map +1 -1
  51. package/dist/src/lib/device.test.js +9 -9
  52. package/dist/src/lib/device.test.js.map +1 -1
  53. package/dist/src/lib/document-reference.js +106 -103
  54. package/dist/src/lib/document-reference.js.map +1 -1
  55. package/dist/src/lib/immunization.js +67 -67
  56. package/dist/src/lib/medication.js +64 -64
  57. package/dist/src/lib/medication.js.map +1 -1
  58. package/dist/src/lib/medicationRequest.js +102 -99
  59. package/dist/src/lib/medicationRequest.js.map +1 -1
  60. package/dist/src/lib/medicationStatement.js +55 -55
  61. package/dist/src/lib/medicationStatement.js.map +1 -1
  62. package/dist/src/lib/organization.js +90 -90
  63. package/dist/src/lib/organization.js.map +1 -1
  64. package/dist/src/lib/patient.js +378 -360
  65. package/dist/src/lib/patient.js.map +1 -1
  66. package/dist/src/lib/patient.test.js +78 -39
  67. package/dist/src/lib/patient.test.js.map +1 -1
  68. package/dist/src/lib/practitioner.js +160 -160
  69. package/dist/src/lib/practitioner.js.map +1 -1
  70. package/index.ts +31 -31
  71. package/jest.config.js +11 -11
  72. package/package.json +45 -54
  73. package/release.config.js +74 -0
  74. package/src/data/patient.json +190 -184
  75. package/src/helpers/patientFactory.ts +13 -0
  76. package/src/lib/allergyIntolerance.ts +36 -36
  77. package/src/lib/bundle.ts +19 -19
  78. package/src/lib/composition.ts +153 -153
  79. package/src/lib/condition.ts +80 -80
  80. package/src/lib/config.test.ts +13 -13
  81. package/src/lib/config.ts +17 -17
  82. package/src/lib/device.test.ts +9 -9
  83. package/src/lib/device.ts +36 -36
  84. package/src/lib/document-reference.ts +102 -102
  85. package/src/lib/immunization.ts +64 -64
  86. package/src/lib/medication.ts +61 -61
  87. package/src/lib/medicationRequest.ts +100 -100
  88. package/src/lib/medicationStatement.ts +52 -52
  89. package/src/lib/organization.ts +89 -89
  90. package/src/lib/patient.test.ts +62 -38
  91. package/src/lib/patient.ts +394 -374
  92. package/src/lib/practitioner.ts +157 -157
  93. package/tsconfig.test.json +17 -17
  94. package/tslint.json +138 -138
package/src/lib/bundle.ts CHANGED
@@ -1,19 +1,19 @@
1
- import * as moment from 'moment';
2
- import { makeUrl } from './config';
3
-
4
- export function encode(ID, resources) {
5
- return {
6
- resourceType: 'Bundle',
7
- id: ID,
8
- meta: {
9
- lastUpdated: moment().format()
10
- },
11
- language: 'es-AR',
12
- entry: resources,
13
- type: 'document',
14
- identifier: {
15
- system: makeUrl('Bundle'),
16
- value: ID
17
- }
18
- };
19
- }
1
+ import moment from 'moment';
2
+ import { makeUrl } from './config';
3
+
4
+ export function encode(ID, resources) {
5
+ return {
6
+ resourceType: 'Bundle',
7
+ id: ID,
8
+ meta: {
9
+ lastUpdated: moment().format()
10
+ },
11
+ language: 'es-AR',
12
+ entry: resources,
13
+ type: 'document',
14
+ identifier: {
15
+ system: makeUrl('Bundle'),
16
+ value: ID
17
+ }
18
+ };
19
+ }
@@ -1,153 +1,153 @@
1
-
2
- import * as moment from 'moment';
3
- import { makeUrl } from './config';
4
-
5
- function getReference(url) {
6
- return {
7
- reference: url
8
- };
9
- }
10
-
11
- export function encode(ID, patientReference, custodianReference, deviceReference, medicationStatementReference, ImmunizationReferences, AllergyIntoleranceReferences, ConditionReferences) {
12
- const now = moment();
13
- let Immunization: any = [];
14
- let conditions: any = [];
15
- let medications: any = [];
16
- let allergyIntolerance = [];
17
-
18
- Immunization = [{
19
- title: 'Vacunas',
20
- text: {
21
- status: 'generated',
22
- div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Sección referida a la vacunación del paciente <\/div>'
23
- },
24
- code: {
25
- coding: [
26
- {
27
- system: 'http:\/\/loinc.org',
28
- display: 'Immunization record',
29
- code: '60484-3'
30
- }
31
- ]
32
- },
33
- entry: ImmunizationReferences ? ImmunizationReferences.map(getReference) : []
34
- }];
35
-
36
- medications = [{
37
- title: 'Medicamentos',
38
- text: {
39
- status: 'generated',
40
- div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Registro de medicamentos<\/div>'
41
- },
42
- code: {
43
- coding: [
44
- {
45
- system: 'http:\/\/loinc.org',
46
- display: 'Medication use',
47
- code: '10160-0'
48
- }
49
- ]
50
- },
51
- entry: medicationStatementReference ? medicationStatementReference.map(getReference) : [],
52
- }];
53
-
54
- allergyIntolerance = [{
55
- title: 'Alergias o Intolerancias',
56
- text: {
57
- status: 'generated',
58
- div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Registro de Alergias<\/div>'
59
- },
60
- code: {
61
- coding: [
62
- {
63
- system: 'http:\/\/loinc.org',
64
- display: 'Allergies and/or adverse reactions',
65
- code: '48765-2'
66
- }
67
- ]
68
- },
69
- entry: AllergyIntoleranceReferences ? AllergyIntoleranceReferences.map(getReference) : [],
70
- }];
71
-
72
- conditions = [{
73
- code: {
74
- coding: [
75
- {
76
- system: 'http:\/\/loinc.org',
77
- display: 'Problem list',
78
- code: '11450-4'
79
- }
80
- ]
81
- },
82
- entry: ConditionReferences ? ConditionReferences.map(getReference) : [],
83
- title: 'Problemas activos',
84
- text: {
85
- status: 'generated',
86
- div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Lista de problemas activos (trastornos)<\/div>'
87
- }
88
- }];
89
-
90
- return {
91
- id: ID,
92
- subject: {
93
- reference: patientReference
94
- },
95
- section: [
96
- ...conditions,
97
- ...medications,
98
- ...Immunization,
99
- ...allergyIntolerance
100
-
101
- ],
102
- resourceType: 'Composition',
103
- author: [
104
- {
105
- identifier: {
106
- system: 'https://federador.msal.gob.ar/uri',
107
- value: deviceReference
108
- }
109
- }
110
- ],
111
- confidentiality: 'N',
112
- type: {
113
- coding: [
114
- {
115
- system: 'http:\/\/loinc.org',
116
- display: 'Patient Summary',
117
- code: '60591-5'
118
- }
119
- ]
120
- },
121
- title: 'Resumen del paciente al ' + now.format('DD/MM/YYYY, HH:mm'),
122
- identifier: {
123
- system: makeUrl('Composition'),
124
- value: ID
125
- },
126
- date: now,
127
- // meta: {
128
- // profile: [
129
- // 'http:\/\/hl7.org\/fhir\/uv\/ips\/StructureDefinition\/composition-uv-ips'
130
- // ]
131
- // },
132
- text: {
133
- status: 'generated',
134
- div: '<div xmlns=\"http://www.w3.org/1999/xhtml\">IPS Neuquen</div>'
135
- },
136
- custodian: {
137
- identifier: {
138
- system: 'https://federador.msal.gob.ar/uri',
139
- value: custodianReference
140
- }
141
- },
142
- attester: [
143
- {
144
- mode: 'legal',
145
- time: now,
146
- party: {
147
- reference: custodianReference
148
- }
149
- }
150
- ],
151
- status: 'final'
152
- };
153
- }
1
+
2
+ import moment from 'moment';
3
+ import { makeUrl } from './config';
4
+
5
+ function getReference(url) {
6
+ return {
7
+ reference: url
8
+ };
9
+ }
10
+
11
+ export function encode(ID, patientReference, custodianReference, deviceReference, medicationStatementReference, ImmunizationReferences, AllergyIntoleranceReferences, ConditionReferences) {
12
+ const now = moment();
13
+ let Immunization: any = [];
14
+ let conditions: any = [];
15
+ let medications: any = [];
16
+ let allergyIntolerance = [];
17
+
18
+ Immunization = [{
19
+ title: 'Vacunas',
20
+ text: {
21
+ status: 'generated',
22
+ div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Sección referida a la vacunación del paciente <\/div>'
23
+ },
24
+ code: {
25
+ coding: [
26
+ {
27
+ system: 'http:\/\/loinc.org',
28
+ display: 'Immunization record',
29
+ code: '60484-3'
30
+ }
31
+ ]
32
+ },
33
+ entry: ImmunizationReferences ? ImmunizationReferences.map(getReference) : []
34
+ }];
35
+
36
+ medications = [{
37
+ title: 'Medicamentos',
38
+ text: {
39
+ status: 'generated',
40
+ div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Registro de medicamentos<\/div>'
41
+ },
42
+ code: {
43
+ coding: [
44
+ {
45
+ system: 'http:\/\/loinc.org',
46
+ display: 'Medication use',
47
+ code: '10160-0'
48
+ }
49
+ ]
50
+ },
51
+ entry: medicationStatementReference ? medicationStatementReference.map(getReference) : [],
52
+ }];
53
+
54
+ allergyIntolerance = [{
55
+ title: 'Alergias o Intolerancias',
56
+ text: {
57
+ status: 'generated',
58
+ div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Registro de Alergias<\/div>'
59
+ },
60
+ code: {
61
+ coding: [
62
+ {
63
+ system: 'http:\/\/loinc.org',
64
+ display: 'Allergies and/or adverse reactions',
65
+ code: '48765-2'
66
+ }
67
+ ]
68
+ },
69
+ entry: AllergyIntoleranceReferences ? AllergyIntoleranceReferences.map(getReference) : [],
70
+ }];
71
+
72
+ conditions = [{
73
+ code: {
74
+ coding: [
75
+ {
76
+ system: 'http:\/\/loinc.org',
77
+ display: 'Problem list',
78
+ code: '11450-4'
79
+ }
80
+ ]
81
+ },
82
+ entry: ConditionReferences ? ConditionReferences.map(getReference) : [],
83
+ title: 'Problemas activos',
84
+ text: {
85
+ status: 'generated',
86
+ div: '<div xmlns="http:\/\/www.w3.org\/1999\/xhtml">Lista de problemas activos (trastornos)<\/div>'
87
+ }
88
+ }];
89
+
90
+ return {
91
+ id: ID,
92
+ subject: {
93
+ reference: patientReference
94
+ },
95
+ section: [
96
+ ...conditions,
97
+ ...medications,
98
+ ...Immunization,
99
+ ...allergyIntolerance
100
+
101
+ ],
102
+ resourceType: 'Composition',
103
+ author: [
104
+ {
105
+ identifier: {
106
+ system: 'https://federador.msal.gob.ar/uri',
107
+ value: deviceReference
108
+ }
109
+ }
110
+ ],
111
+ confidentiality: 'N',
112
+ type: {
113
+ coding: [
114
+ {
115
+ system: 'http:\/\/loinc.org',
116
+ display: 'Patient Summary',
117
+ code: '60591-5'
118
+ }
119
+ ]
120
+ },
121
+ title: 'Resumen del paciente al ' + now.format('DD/MM/YYYY, HH:mm'),
122
+ identifier: {
123
+ system: makeUrl('Composition'),
124
+ value: ID
125
+ },
126
+ date: now,
127
+ // meta: {
128
+ // profile: [
129
+ // 'http:\/\/hl7.org\/fhir\/uv\/ips\/StructureDefinition\/composition-uv-ips'
130
+ // ]
131
+ // },
132
+ text: {
133
+ status: 'generated',
134
+ div: '<div xmlns=\"http://www.w3.org/1999/xhtml\">IPS Neuquen</div>'
135
+ },
136
+ custodian: {
137
+ identifier: {
138
+ system: 'https://federador.msal.gob.ar/uri',
139
+ value: custodianReference
140
+ }
141
+ },
142
+ attester: [
143
+ {
144
+ mode: 'legal',
145
+ time: now,
146
+ party: {
147
+ reference: custodianReference
148
+ }
149
+ }
150
+ ],
151
+ status: 'final'
152
+ };
153
+ }
@@ -1,80 +1,80 @@
1
- import { makeUrl } from './config';
2
-
3
- /**
4
- *
5
- * @param registro Registro RUP a transformar a FHIR
6
- */
7
-
8
-
9
- export function encode(patientReference, registro) {
10
- return {
11
- id : registro._id,
12
- category : [
13
- {
14
- coding : [
15
- {
16
- system : 'http://loinc.org',
17
- display : 'Problem',
18
- code : '75326-9'
19
- }
20
- ]
21
- }
22
- ],
23
- subject : {
24
- reference : patientReference
25
- },
26
- onsetDateTime : registro.createdAt.getFullYear(), // [TODO] No va solo el año
27
- resourceType : 'Condition',
28
- // Por el momento ponemos 'confirmed'
29
- verificationStatus : {
30
- coding : [
31
- {
32
- system : 'http://terminology.hl7.org//CodeSystem//condition-ver-status',
33
- code : 'confirmed'
34
- }
35
- ]
36
- },
37
- code : {
38
- coding : [
39
- {
40
- code : registro.concepto.conceptId,
41
- system : 'http://snomed.info/sct',
42
- display : registro.concepto.fsn
43
- }
44
- ]
45
- },
46
- recordedDate : registro.createdAt,
47
- meta : {
48
- profile : [
49
- 'http://hl7.org/fhir/uv/ips/StructureDefinition/condition-uv-ips'
50
- ]
51
- },
52
- text : {
53
- status : 'generated',
54
- div: `<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: Problema: </p><p>${registro.nombre}</p></div>`
55
- },
56
- severity : { // [TODO] Sacar esto porque no lo tenemos todavía. No hay un campo de severidad.
57
- coding : [
58
- {
59
- system : 'http://loinc.org',
60
- display : 'Moderate',
61
- code : 'LA6751-7'
62
- }
63
- ]
64
- },
65
- clinicalStatus : {
66
- coding : [
67
- {
68
- system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
69
- code: registro.valor.estado // [TODO] Tenemos este dato.
70
- },
71
- {
72
- system: 'http://terminology.hl7.org/CodeSystem/evolution',
73
- // code: registro.valor.evolucion.replace('<p>','').replace('</p>','') // [TODO] Tenemos este dato.
74
- code: registro.valor.evolucion // [TODO] Tenemos este dato.
75
- }
76
- ]
77
- }
78
- };
79
- }
80
-
1
+ import { makeUrl } from './config';
2
+
3
+ /**
4
+ *
5
+ * @param registro Registro RUP a transformar a FHIR
6
+ */
7
+
8
+
9
+ export function encode(patientReference, registro) {
10
+ return {
11
+ id : registro._id,
12
+ category : [
13
+ {
14
+ coding : [
15
+ {
16
+ system : 'http://loinc.org',
17
+ display : 'Problem',
18
+ code : '75326-9'
19
+ }
20
+ ]
21
+ }
22
+ ],
23
+ subject : {
24
+ reference : patientReference
25
+ },
26
+ onsetDateTime : registro.createdAt.getFullYear(), // [TODO] No va solo el año
27
+ resourceType : 'Condition',
28
+ // Por el momento ponemos 'confirmed'
29
+ verificationStatus : {
30
+ coding : [
31
+ {
32
+ system : 'http://terminology.hl7.org//CodeSystem//condition-ver-status',
33
+ code : 'confirmed'
34
+ }
35
+ ]
36
+ },
37
+ code : {
38
+ coding : [
39
+ {
40
+ code : registro.concepto.conceptId,
41
+ system : 'http://snomed.info/sct',
42
+ display : registro.concepto.fsn
43
+ }
44
+ ]
45
+ },
46
+ recordedDate : registro.createdAt,
47
+ meta : {
48
+ profile : [
49
+ 'http://hl7.org/fhir/uv/ips/StructureDefinition/condition-uv-ips'
50
+ ]
51
+ },
52
+ text : {
53
+ status : 'generated',
54
+ div: `<div xmlns="http://www.w3.org/1999/xhtml"><p><b>Generated Narrative with Details</b></p><p><b>id</b>: Problema: </p><p>${registro.nombre}</p></div>`
55
+ },
56
+ severity : { // [TODO] Sacar esto porque no lo tenemos todavía. No hay un campo de severidad.
57
+ coding : [
58
+ {
59
+ system : 'http://loinc.org',
60
+ display : 'Moderate',
61
+ code : 'LA6751-7'
62
+ }
63
+ ]
64
+ },
65
+ clinicalStatus : {
66
+ coding : [
67
+ {
68
+ system: 'http://terminology.hl7.org/CodeSystem/condition-clinical',
69
+ code: registro.valor.estado // [TODO] Tenemos este dato.
70
+ },
71
+ {
72
+ system: 'http://terminology.hl7.org/CodeSystem/evolution',
73
+ // code: registro.valor.evolucion.replace('<p>','').replace('</p>','') // [TODO] Tenemos este dato.
74
+ code: registro.valor.evolucion // [TODO] Tenemos este dato.
75
+ }
76
+ ]
77
+ }
78
+ };
79
+ }
80
+
@@ -1,13 +1,13 @@
1
- import { getDominio, makeUrl } from './config';
2
-
3
- test('Get default domain', () => {
4
- expect(getDominio()).toBe('andes.gob.ar');
5
- });
6
-
7
- test('Get default URL without id', () => {
8
- expect(makeUrl('patient')).toBe('andes.gob.ar/patient');
9
- });
10
-
11
- test('Get default URL with id', () => {
12
- expect(makeUrl('patient', '123456')).toBe('andes.gob.ar/patient/123456');
13
- });
1
+ import { getDominio, makeUrl } from './config';
2
+
3
+ test('Get default domain', () => {
4
+ expect(getDominio()).toBe('andes.gob.ar');
5
+ });
6
+
7
+ test('Get default URL without id', () => {
8
+ expect(makeUrl('patient')).toBe('andes.gob.ar/patient');
9
+ });
10
+
11
+ test('Get default URL with id', () => {
12
+ expect(makeUrl('patient', '123456')).toBe('andes.gob.ar/patient/123456');
13
+ });
package/src/lib/config.ts CHANGED
@@ -1,17 +1,17 @@
1
- let DOMINIO = 'andes.gob.ar';
2
-
3
- export function initialize({ dominio }) {
4
- DOMINIO = dominio;
5
- }
6
-
7
- export function getDominio() {
8
- return DOMINIO;
9
- }
10
-
11
- export function makeUrl(resource, id = null) {
12
- let url = `${DOMINIO}/${resource}`;
13
- if (id) {
14
- url += `/${id}`;
15
- }
16
- return url;
17
- }
1
+ let DOMINIO = 'andes.gob.ar';
2
+
3
+ export function initialize({ dominio }) {
4
+ DOMINIO = dominio;
5
+ }
6
+
7
+ export function getDominio() {
8
+ return DOMINIO;
9
+ }
10
+
11
+ export function makeUrl(resource, id = null) {
12
+ let url = `${DOMINIO}/${resource}`;
13
+ if (id) {
14
+ url += `/${id}`;
15
+ }
16
+ return url;
17
+ }
@@ -1,9 +1,9 @@
1
- import { encode } from './device';
2
-
3
- test('Device type 1', () => {
4
- expect(encode().id).toBe('device-01');
5
- });
6
-
7
- test('Device Name', () => {
8
- expect(encode().deviceName[0].name).toBe('Sistema de Aplicaciones Neuquinas de Salud (ANDES)');
9
- });
1
+ import { encode } from './device';
2
+
3
+ test('Device type 1', () => {
4
+ expect(encode().id).toBe('device-01');
5
+ });
6
+
7
+ test('Device Name', () => {
8
+ expect(encode().deviceName[0].name).toBe('Sistema de Aplicaciones Neuquinas de Salud (ANDES)');
9
+ });
package/src/lib/device.ts CHANGED
@@ -1,36 +1,36 @@
1
- import { makeUrl } from './config';
2
-
3
- export function encode() {
4
- /**
5
- * HARDCODE DEVICE
6
- */
7
-
8
- return {
9
- resourceType: 'Device',
10
- id: 'device-01',
11
- identifier: [
12
- {
13
- system: makeUrl('Device'),
14
- value: 'device-01'
15
- }
16
- ],
17
- type: {
18
- coding: [
19
- {
20
- system: 'http://snomed.info/sct',
21
- code: '462894001',
22
- display: 'software de aplicación de sistema de información de historias clínicas de pacientes (objeto físico)'
23
- }
24
- ]
25
- },
26
- owner: {
27
- reference: 'http://argentina.gob.ar/salud/refes/14999912399913'
28
- },
29
- deviceName: [
30
- {
31
- name: 'Sistema de Aplicaciones Neuquinas de Salud (ANDES)',
32
- type: 'manufacturer-name'
33
- }
34
- ]
35
- };
36
- }
1
+ import { makeUrl } from './config';
2
+
3
+ export function encode() {
4
+ /**
5
+ * HARDCODE DEVICE
6
+ */
7
+
8
+ return {
9
+ resourceType: 'Device',
10
+ id: 'device-01',
11
+ identifier: [
12
+ {
13
+ system: makeUrl('Device'),
14
+ value: 'device-01'
15
+ }
16
+ ],
17
+ type: {
18
+ coding: [
19
+ {
20
+ system: 'http://snomed.info/sct',
21
+ code: '462894001',
22
+ display: 'software de aplicación de sistema de información de historias clínicas de pacientes (objeto físico)'
23
+ }
24
+ ]
25
+ },
26
+ owner: {
27
+ reference: 'http://argentina.gob.ar/salud/refes/14999912399913'
28
+ },
29
+ deviceName: [
30
+ {
31
+ name: 'Sistema de Aplicaciones Neuquinas de Salud (ANDES)',
32
+ type: 'manufacturer-name'
33
+ }
34
+ ]
35
+ };
36
+ }