Added a new query getCounterReferenceNoteByPatientId