## 2 Materials and Methods
### Health Data  
In this paper, which proposes a data management model, we reviewed public data collections from many sources, such as Spanish National Statistics Institute (INE), Eurostat, Centers for Medicare and Medicaid Services (CMS), Payroll-Based Journal Public Use Files, and the Payroll-Based Journal system. Daily resident census information was based on Minimum Data Set (MDS), Healthcare Research and Quality (HRQ), Kaggle website and many more. They are freely accessible data, and their use does not entail major ethical or legal problems.  
Here, it is proposed, as is being done in many institutions, to process combined clinical and economic data. Listings of patients, their illnesses, and discharge data, or Diagnosis-Related Groups (DRGs), personal health records (PHR), results of medical examinations [7; 13; 14], provide valuable information for making short- and long-term resource planning predictions, because they can allow individual patient billing to be assessed in a hospital.  
However, personal health data have the highest degree of protection, so accessing or working with these data is not easy [15; 16]. One might ask: can an institution use administrative and health data of patients in its economic management? What requirements should be considered to access databases with personal health data of their patients?  
In Europe, the official data protection regulation (EU) _2016/679_ (General Data Protection Regulation (EU GDPR)) establishes that \"the principles of data protection should apply to any information concerning an identified or identifiable natural person\" [17]. Having compared five different legislative jurisdictions, [PERSON] and [PERSON] concluded that among the legislation reviewed, EU GDPR stands out as seemingly providing the most comprehensive and stringent protection measures; yet, it appears to leave significant room for interpretation and a degree of ambiguity in key areas [15].  
In this situation, it can be argued that those responsible for the financial management of a hospital need access to personal data to be able to properly manage the institutions, since only this information allows financial and resource expenses to be analyzed and understood. In this aspect, it should be distinguished whether access to personal data is included in a healthcare project that is developed based on medical assistance or in a research project that seeks to improve the management of clinical expenditure in the short or mid-term [16].  
It is clear that the professionals who make up the financial management services of a hospital can access, ethically and legally, personal data of an administrative nature for the management of the institution. It is not as clear that they can directly access these data, without specific consent, for a research project that aims to develop, for example, an algorithm that can be applied later.  
Another ethical and legal consideration is the access to personal health data. It is possible to access the identified health data, after signing the corresponding data process ing contract, for all procedures related to clinical assistance to a person. However, for other uses, it is recommended to use anonymized health data, and if this is not possible, pseudonymized health data can be considered. \"Personal data which have undergone pseudonymization, which could be attributed to a natural person by the use of additional information should be considered to be information on an identifiable natural person\" [6]. For AI research and financial management, the pseudonymization of health data, together with a commitment not to identify individual persons, would make it easier to access patient data [7].