Skip to content

Instantly share code, notes, and snippets.

@iaditya
Last active May 6, 2017 09:51
Show Gist options
  • Save iaditya/7f3dc996f705fa3b7dceecf03715c7db to your computer and use it in GitHub Desktop.
Save iaditya/7f3dc996f705fa3b7dceecf03715c7db to your computer and use it in GitHub Desktop.
$today = Time::now()->toDateString();
$patient_scale_entities = $this->Patients->PatientScales->findByPatientId($patient->id)
->where(['PatientScales.completed' => 0])
->andWhere(['Date(PatientScales.validity_date) >=' => $today]);
if($patient_scale_entities->count() > 0) {
foreach ($patient_scale_entities as $patient_scale_entity) {
$patient_scale_entity->caregiver_patient_id = $new_caregiver_id1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment