(self)
Reset the name changes back to their original values, which are
        taken from the patient details that OpenMRS returned at the
        start of the workflow.
Reset the name changes back to their original values, which are
        taken from the patient details that OpenMRS returned at the
        start of the workflow.
Reset the name changes back to their original values which are taken from the patient details that OpenMRS returned at the start of the workflow .
def rollback(self):
        """
        Reset the name changes back to their original values, which are
        taken from the patient details that OpenMRS returned at the
        start of the workflow.
        """
        properties = {
            property_: self.person['preferredName'].get(property_)
            for property_ in self.openmrs_config.case_config.person_preferred_name.keys()
            if property_ in NAME_PROPERTIES
        }
        if properties:
            self.requests.post(
                '/ws/rest/v1/person/{person_uuid}/name/{name_uuid}'.format(
                    person_uuid=self.person_uuid,
                    name_uuid=self.name_uuid,
                ),
                json=properties,
                raise_for_status=True,
            )
def rollback ( self ) : properties = { property_ : self . person [ 'preferredName' ] . get ( property_ ) for property_ in self . openmrs_config . case_config . person_preferred_name . keys ( ) if property_ in NAME_PROPERTIES } if properties : self . requests . post ( '/ws/rest/v1/person/{person_uuid}/name/{name_uuid}' . format ( person_uuid = self . person_uuid , name_uuid = self . name_uuid , ) , json = properties , raise_for_status = True , )