SYNOPSIS

int MGOaddaffiliation (Validation *val, int opts)

DESCRIPTION

The MGOaddaffilation() function adds/updates the affiliation record for each validation source that matches the given validation id. Information is passed through val. The required and optional fields are (the values in brackets indicate which validation tables the field is defined for):

val.uwnetid is the uwnetid name. val.validid is the validation id. val.ein is the employee number. val.ssn is the social security number. val.studentid is the student number. val.account is the AVF account name. val.system_key is the student system key value. val.clinicianid is the clinician id. val.advanceid is the advance id. val.regid is the registry id. You must specify the uwnetid field, plus one (or more) of: validid, ein, ssn, studentid, account, system_key, clinicianid, advanceid, regid. val.lname is the last name. val.pac is the private access code. If specified and the pac is marked as one-time, the pac will expire automatically in two hours. val.birthdate is the birthdate in YYYY-MM-DD form. val.source_code is the validation source reference code. val.status_code is the affiliation status reference code. opts can be one or more of:

RETURN VALUE

Returns the number of records added upon success or -1 if an error occurred (in which case MGOerrno and MGOerrmsg are set appropriately).

ERRORS

AUTHENTICATION LEVEL

wmango

SEE ALSO

MGOgetaffiliations(), MGOselraffstatus(), MGOselrvalsource(), MGOzero()