def dicom_patient_stuff(newdcm, templatedcm):
    """

    :param newdcm: the pydicom dataset that we are modifying
    :param templatedcm: the template pydicom dataset (probably loaded
                        from a sample image)
    :return: a modified pydicom dataset with patient details
    """
    newdcm.PatientBirthDate = templatedcm.PatientBirthDate
    newdcm.PatientID = templatedcm.PatientID
    newdcm.PatientName = templatedcm.PatientName
    newdcm.PatientSex = templatedcm.PatientSex
    newdcm.ReferringPhysicianName = templatedcm.ReferringPhysicianName
    newdcm.StudyInstanceUID = templatedcm.StudyInstanceUID
    newdcm.StudyDate = templatedcm.StudyDate
    newdcm.StudyTime = templatedcm.StudyTime
    newdcm.StudyID = templatedcm.StudyID
    return newdcm