public static EditPatientDialogFragment newInstance(Patient patient){
  EditPatientDialogFragment fragment=new EditPatientDialogFragment();
  Bundle args=new Bundle();
  args.putBoolean("new",patient == null);
  if (patient != null) {
    args.putString("uuid",patient.uuid);
    args.putString("id",patient.id);
    args.putString("givenName",patient.givenName);
    args.putString("familyName",patient.familyName);
    args.putString("birthdate",Utils.toString(patient.birthdate));
    args.putInt("gender",patient.gender);
  }
  fragment.setArguments(args);
  return fragment;
}

public static EditPatientDialogFragment newInstance ( Patient patient ) { EditPatientDialogFragment fragment = new EditPatientDialogFragment ( ) ; Bundle args = new Bundle ( ) ; args . putBoolean ( "new" , patient == null ) ; if ( patient != null ) { args . putString ( "uuid" , patient . uuid ) ; args . putString ( "id" , patient . id ) ; args . putString ( "givenName" , patient . givenName ) ; args . putString ( "familyName" , patient . familyName ) ; args . putString ( "birthdate" , Utils . toString ( patient . birthdate ) ) ; args . putInt ( "gender" , patient . gender ) ; } fragment . setArguments ( args ) ; return fragment ; }
creates a new instance and registers the given ui , if specified .
