Inclusion Criteria:
* Patient hospitalized (for a minimum estimated duration of 21 days) in a geriatric department in Medical Care and Rehabilitation, Cognitive-Behavioral Unit, or housed in a Reinforced Housing Unit, in a Long-Term Care Unit, or in a Psycho-Geriatric Unit.
* Moderate to severe cognitive impairment, defined by a MMSE (Mini Mental State Examination) score \<15. If not feasible at inclusion, MMSE score \<15 less than 1 year old.
* Patient opposed to care, presenting at least two episodes of opposition to care (meals excluded) for which other non-medication alternatives have failed. These refusals of care are defined by a \"resistance to care\" score ≥3 on the Pittsburgh scale, over the last week. In practice, the resistance to care of patients is noted in the medical record following a weekly multidisciplinary decision.
The targeted cares:
Essential nursing care (indispensable, mandatory, and prescribed) Bathing and changing made essential by obvious lack of hygiene after evaluation Bedtime installation (e.g., with the SECURIDRAP® device) technical care: blood tests, wound care, dressing changes, insertion of urinary or nasogastric tubes; administration of medication by parenteral route
* Person affiliated with social security or beneficiary of such a scheme
* Informed, written, and signed consent by the patient or their legal representative (for adults under legal protection and unable to express their consent)
Exclusion Criteria:
* Patient who has received midazolam treatment in the week before inclusion
* Patient with contraindications to midazolam:
severe Myasthenia Severe respiratory failure requiring continuous oxygen therapy Severe liver failure: PT \<50% Severe sleep apnea syndrome not treated with a device Severe renal failure: Cockcroft \<20mL/min Severe heart failure in a state of decompensation History of alcoholism or drug addiction
* Known hypersensitivity to the active substance, benzodiazepines, or any of the excipients
* Patient being treated concurrently with:
CYP3A4 enzyme inhibitors CYP3A4 enzyme inducers
* Weight \<50 kg and \>100 kg
* Gastrointestinal pathology that may limit or prevent the absorption of midazolam
* Identification of anxiety, defined by item E of the NPI (neuropsychiatric inventory) by an evaluation \>2 in frequency and severity according to HAS recommendations.
* Identification of pain, defined by the Algoplus scale by an evaluation ≥2
* Identification of ideational disorders, defined by item E of the Cornell scale: E\>0
* Subject in the exclusion period of another clinical trial
* Subject deprived of liberty by an administrative or judicial decision.