System Information
- Strapi Version:
- Operating System:
- Database:
- Node Version:
- NPM Version:
- Yarn Version:
Hi there, I am new to strapi, and I am tring to implement the following scenario:
- my application can get a file with information of 3 kind of hospital, and I need to show it
according to the type of data and departments - each hospital have some type of data like surgery, births etc
- each type of data have a list of departments like children, Oncology etc
- each department have values of amount and sum
the json should like like (ignore the numbers of 0) :
[
{
"hospital_type": 'General Hospital',
"slug": "general-hospital",
"kindOfData": {
"surgeries": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
}
},
"Births": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
}
},
"Hospitalization days": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
},
}
}
},
{
"hospital_type": 'Psychiatric Hospital',
"slug": "psychiatric-hospital",
"kindOfData": {
"surgeries": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
}
},
"Births": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
}
},
"Hospitalization days": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
},
}
}
},
{
"hospital_type": 'Geriatrics Hospital',
"slug": "geriatrics-hospital",
"kindOfData": {
"surgeries": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
}
},
"Births": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
}
},
"Hospitalization days": {
"departments": {
"Orthopedics": {
"amount": 0,
"sum": 0
},
"children": {
"amount": 0,
"sum": 0
},
"Oncology": {
"amount": 0,
"sum": 0
}
},
}
}
}
]
I can not use relation here because every amount /sum of any department is different for each kind of hospital.
thanks!