validate
Used internally by the SDK to determine if this DexCarePatient has sufficient information to schedule a virtual visit.
When validating PatientDemographics, only the first entry in the demographicsLinks list is used. The first entry in the list is assumed to be the most up-to-date demographics and is used internally for network calls.
This method checks the following in order:
demographicsLinks is not empty.
firstName is not empty.
lastName is not empty.
phone is not empty.
phone is valid per PhoneValidator.isValid. The phone number string is stripped of any special characters before validation, using PhoneValidator.removeSpecialCharacters.
email is not empty.
email is valid per EmailValidator.isValid.
address.postalCode is valid per ZipCodeValidator.isValid.
patientGuid is not empty.
Return
A MissingInformationError with an error string identifying one of the above issues, or null if the object passes validation.