-
Notifications
You must be signed in to change notification settings - Fork 2
/
DGCVaccinationInformation.js
56 lines (47 loc) · 1.86 KB
/
DGCVaccinationInformation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const faker = require('faker');
const { getDGCVaccine } = require('./DGCVaccine');
const getDGCVaccinationInformation = () => {
const getAdministeringCenter = () => {
const centers = [
'AZ. OSPEDALIERO - UNIVERSITARIA CAREGGI',
'München Klinik Bogenhausen',
'Hospital Universario La Paz'
];
return centers[faker.random.number({ min: 0, max: 2 })];
};
const getBatchNumber = () => {
const batchnumbers = ['A1235742', 'B1235742', 'C1235742', 'D1235742'];
return batchnumbers[faker.random.number({ min: 0, max: 3 })];
};
const getCountryOfVaccination = () => {
const isocodes = ['it', 'de', 'es'];
return isocodes[faker.random.number({ min: 0, max: 2 })];
};
const getHealthProfessional = () => {
const healthprofs = ['VRDRCR70H08H703B', 'MSSCZN70H08H704F', 'RCSTGI90B1823661'];
return healthprofs[faker.random.number({ min: 0, max: 2 })];
};
const getVaccineAdminOrder = () => {
const order = ['1 of 2', '2 of 2', '1 of 1'];
return order[faker.random.number({ min: 0, max: 2 })];
};
const getVaccine = () => {
const vax = getDGCVaccine();
return vax;
};
// 'ICD-11#164949870';
const example = {
'@context': ['https://w3id.org/pathogen/v1'],
type: 'DGCVaccinationInformation',
administeringCentre: getAdministeringCenter(),
batchNumber: getBatchNumber(),
countryOfVaccination: getCountryOfVaccination(),
dateOfVaccination: faker.date.between('2021-05-15', '2021-02-01'),
healthProfessional: getHealthProfessional(),
nextVaccinationDate: faker.date.between('2021-05-11', '2021-06-11'),
order: getVaccineAdminOrder(),
vaccine: getVaccine(),
};
return example;
};
module.exports = { getDGCVaccinationInformation };