Unable to get Student's health care provider via VBA/API in EE

EEARecordMedicalFields for the cEAStudent object do not return any values.
For example:
cEAStudent.Medical.Fields(EEARecordMedicalFields.EARECORDMEDICAL_fld_PRIMARYPOLICYCONTACT)
cEAStudent.Medical.Fields(EEARecordMedicalFields.EARECORDMEDICAL_fld_PRIMARYHEALTHCAREPROVIDER)
 
cEAMedicalInsurance and cEAMedicalInsurances objects have been added and should now be used. 
To get to new objects you have to go through the IBBMetaField and use the ChildObject property.

    Dim oMeta As IBBMetaField
    Dim oMedInsurances As IBBDataCollection
    Dim oIns As IBBDataObject
    Set oMeta = oStudent.Medical
    Set oMedInsurances = oMeta.ChildObject(EEARecordMedical_Children.EARECORDMEDICAL_child_INSURANCES)
    For Each oIns In oMedInsurances
        Debug.Print oIns.Fields(EEAMedicalInsuranceFields.EAMEDICALINSURANCE_fld_PRIMARYINSURANCE)
        Debug.Print oIns.Fields(EEAMedicalInsuranceFields.EAMEDICALINSURANCE_fld_POLICYCONTACTNAME)
        Debug.Print oIns.Fields(EEAMedicalInsuranceFields.EAMEDICALINSURANCE_fld_ORGANIZATIONNAME)
    Next oIns

Environment

 7.82.104 Patch 18

Was this article helpful?