Traditional psychiatric hospitalization models have been criticized for being restrictive and for violating fundamental rights, which can be counterproductive for long-term patient recovery. In response to this situation, new hospitalization models have been developed that aim to create a safe therapeutic environment that promotes patient recovery, while minimizing the need for coercive measures. The psychiatry unit from Germans Trias i Pujol Hospital (HGTiP) has designed a dual model that combines a care method, called Safewards, with a risk prediction tool in emergencies and a risk categorization and workload tool on the ward through a global score. The objective of the model is to safely open the unit doors, taking into account the risks and the level of work of the care team. The tools currently used are not scientifically validated, thus hindering the scalability of the model. Therefore, the purpose of this project is to develop a proposal for intervention to develop two Artificial Intelligence (AI) algorithms, using validated variables, that predict the unit environment and patient risk at the time of admission. First, a qualitative study was conducted with expert personnel from the psychiatric unit at HGTiP to objectify the criteria by which risk level and workload on the ward are defined. A total of 35 items were extracted, and a digital platform was developed to store them. These will be used, along with other dynamic variables, as input into a regression algorithm. In addition, classification algorithms will be developed to predict the level of risk in the first 24 hours of admission. The input data will have variables related to symptoms and conflictive events in the last month. For both cases, the performance of different algorithms will be evaluated, and the one with the best predictive character will be chosen. This dual model, which uses Artificial Intelligence as a tool to support clinical decision-making, sets a precedent in risk control in open door models. Once the model is fully validated, it will be scalable to other units and will allow for an improvement in the quality of care, while maintaining the safety of all individuals involved in the recovery process Los modelos de hospitalización psiquiátrica tradicionales han sido criticados por ser restrictivos y vulnerar derechos fundamentales, lo que puede ser contraproducente para la recuperación de los pacientes a largo plazo. En respuesta a esta situación, se han desarrollado nuevos modelos de hospitalización que pretenden crear un ambiente terapéutico seguro y que promueva la recuperación del paciente, minimizando la necesidad de medidas coercitivas. El Hospital Germans Trias i Pujol, ha diseñado un modelo dual, que combina un método asistencial, llamado Safewards, con una herramienta de predicción de riesgos en urgencias y una categorización de riesgos y de carga asistencial en planta a través de una puntuación global. El objetivo del modelo es abrir las puertas de la unidad de manera segura, teniendo en cuenta los riesgos y el nivel de trabajo del equipo asistencial. Las herramientas que se usan actualmente no están validadas científicamente, dificultando así la escalabilidad del modelo. Por lo que la finalidad de este proyecto es elaborar una propuesta de intervención para desarrollar dos algoritmos de Inteligencia Artificial, con variables validadas, que predigan el ambiente de la unidad y el riesgo de un paciente en el momento de ingreso. En primer lugar, se ha realizado un estudio cualitativo con personal experto de la unidad de psiquiatría del HGTiP para objetivar los criterios por los que se define el nivel de riesgo y la carga asistencial en planta. Se han extraído un total de 35 ítems y se ha desarrollado una plataforma digital para almacenarlos. Estos serán utilizados, junto a otras variables dinámicas, como entrada en un algoritmo de regresión. Por otra parte, se desarrollarán algoritmos de clasificación para predecir el nivel de riesgo en las primeras 24 horas de ingreso. Los datos de entrada serán variables relacionadas con sintomatología y eventos conflictivos en el último mes. Para ambos casos, se evaluará el rendimiento de diferentes algoritmos y se elegirá el que mejor carácter predictivo tenga. Este modelo dual, que utiliza la Inteligencia Artificial como herramienta de apoyo a la decisión clínica, supone un precedente en el control de riesgos en modelos de puertas abiertas. Una vez validado el modelo en su totalidad, sería escalable a otras unidades y permitiría mejorar la calidad asistencial, manteniendo la seguridad de todas las personas implicadas en el proceso de recuperación Els models d'hospitalització psiquiàtrica tradicionals han estat criticats per ser restrictius i vulnerar drets fonamentals, cosa que pot ser contraproduent per a la recuperació dels pacients a llarg termini. En resposta a aquesta situació, s'han desenvolupat nous models d'hospitalització que pretenen crear un ambient terapèutic segur i que promogui la recuperació del pacient, minimitzant la necessitat de mesures coercitives. L'Hospital Germans Trias i Pujol, ha dissenyat un model dual, que combina un mètode assistencial, anomenat Safewards, amb una eina de predicció de riscos a urgències i una categorització de riscos i de càrrega assistencial a planta a través d'una puntuació global. L'objectiu del model és obrir les portes de la unitat de manera segura, tenint en compte els riscos i el nivell de treball de l'equip assistencial. Les eines que es fan servir actualment no estan validades científicament, dificultant així l'escalabilitat del model. La finalitat d'aquest projecte és elaborar una proposta d'intervenció per desenvolupar dos algorismes d'Intel·ligència Artificial, amb variables validades, que prediguin l'ambient de la unitat i el risc d'un pacient a l'ingrés. En primer lloc, s'ha fet un estudi qualitatiu amb personal expert de la unitat de psiquiatria de l'HGTiP per objectivar els criteris pels quals es defineix el nivell de risc i la càrrega assistencial a planta. Se n'han extret un total de 35 ítems i s'ha desenvolupat una plataforma digital per emmagatzemar-los. Aquests seran utilitzats, juntament amb altres variables dinàmiques, com a entrada en un algorisme de regressió. D'altra banda, es desenvoluparan algorismes de classificació per predir el nivell de risc en les primeres 24 hores d’ingrés. Les dades d'entrada seran variables relacionades amb simptomatologia i esdeveniments conflictius a l'últim mes. Per a tots dos casos, s'avaluarà el rendiment de diferents algorismes i es triarà el que millor caràcter predictiu tingui. Aquest model dual, que utilitza la Intel·ligència Artificial com a eina de suport a la decisió clínica, suposa un precedent en el control de riscos en models de portes obertes. Una vegada validat el model en la seva totalitat, seria escalable a altres unitats i permetria millorar la qualitat assistencial, mantenint la seguretat de totes les persones implicades en el procés de recuperació