Added a new query getLastPregnancyByPatientId