Postgresql and Java porgrammer needed. store procedures and embedded SQL to achieve the following functionalities:
1. Login: Provide the user name and password, check if the credentials are correct, and return a success or failure message accordingly.
2. Update_password: Provide the username and original password, check if they are valid and, if so, replace the original password with the new one and return a message confirming the update.
3. Retrieve_patient: Provide the patient ID and return the corresponding record from the patient table.
4. Set_preferred_creditCard: Provide the credit card number and patient ID. Mark the patient’s credit card as preferred and also retrieve the corresponding billing address. Return a message confirming the update and also print out the credit card number and associated billing address information.
5. Get_medicine_availability: Provide the medicine ID and date to check how much of it is left on the specified date. Return a message confirming the quantity available in the hospital inventory.
6. Charge_patient: Provide the patient ID and bill date to check the patient’s charges: total amount and the break down by source. Return a table showing the total bill amount and the breakdown of the charges by source. The return table should look like this: