UPDATE AKUZ.T_MEDICAL_RECORD MR
SET PostingDate = PR.RouteDate
FROM AKUZ.T_PRESCRIPTION_RECORD PR
WHERE MR.MedicalRecordID = PR.MedicalRecordID
  AND PR.RouteDate IS NOT NULL;

UPDATE AKUZ.T_MEDICAL_RECORD MR
SET PostingDate = R.RecipeDate
FROM AKUZ.T_RECIPE R
WHERE MR.MedicalRecordID = R.MedicalRecordID
  AND R.RecipeDate IS NOT NULL;
