====== op.care.bhp.PnlBHP ====== **Please note:** The term BHP is an abbreviation for the german word: "Behandlungspflege". These are the measures which have been prescribed by a GP and assigned to the responsibility of the nursery staff. Applying medication is one of those measures, for instance. This Panel is handling the BHPs for the daily access by the nursery staff. The user can apply, refuse, refuse (with discarding the medication), undo the several BHPs presented. ===== Security ===== Internal module ID: ''nursingrecords.bhp'' ^ACL^effect| |**PRINT**|print the daily plan of all BHPs| |**UPDATE**|necessary to generally modify the several BHPs. this should only be granted to trained personell.| ==== isChangeable() ==== Besides the ACLs there are further professional reasons to allow or prevent the access to the BHPs. To tell if a BHP may be changed, it is vital to consider the state of the BHPs and some other issues. There is one method that has a very important role in the authorization chain: ''BHPTools.isChangeable(BHP bhp)''. **This method is only useful for BHPs, that are not open anymore.** It returns ''true'' (hence empowering the user to change the BHP) when the following conditions are satisfied: * the time (in minutes) between confirming (apply) the BHP and **now** doesn't exceed ''SYSPropsTools.BHP_MAX_MINUTES_TO_WITHDRAW'', which is currently hardcoded in the connected database table ''sysprops''. * the underlying prescription is not **closed** * this BHP must not be **open**, and the **user trying to change it now, is the same one who confirmed it** in the first place. * the resident is **active** in the system and **not currently absent** * if there is medication involved, there must not be any trouble with it. meaning: * if the medication's stocks should be calculated, the there must be an **accessable stock** in use. * it is way to complex to undo withdrawals for more than one stock((which can happen if a stock is emptied during the cause of the confirming the BHP and a new stock is opened and used automatically)). Therefore the user **CANNOT** undo them. ==== Confirming, refusing or discarding an open BHP ==== the user can apply, refuse or refuse (discard) a BHP if: * it is still **open** (of course) * the underlying prescription is not **closed** * the method ''BHPTools.isChangeable(BHP bhp)'' returns ''true''. ==== undoing a confirmed BHP ==== a user can reset a BHP to the **open** state if: * it is **NOT open** * the underlying prescription is not **closed** * the method ''BHPTools.isChangeable(BHP bhp)'' returns ''true''.