locked
FamilyHistoryV3 Problem RRS feed

  • Question

  • I m inserting a record in Family History with following Properties :

    Condition name High cholesterol
     
    Relative name Auntie
    Relationship Aunt
     
    Note
    TEST
    Source Mayo Clinic Health Manager

     

    But i'm getting exception as :

     Unable to cast object of type 'Microsoft.Health.ItemTypes.FamilyHistoryV3' to type 'Microsoft.Health.ItemTypes.FamilyHistory'.
       at QueryHealthDataService.QueryHealthData.GetFamilyHistoryData(HealthRecordItemCollection items, Int32& ResponseCode) in D:\Web services\QueryHealthDataService_HV\QueryHealthDataService_HV\QueryHealthDataService_HV.asmx.cs:line 1364
       at QueryHealthDataService.QueryHealthData.ReturnXmlString(String HeathDataTypeName, HealthRecordItemCollection items, Int32 NoOfRecords, Int32& ResponseCode) in D:\Web services\QueryHealthDataService_HV\QueryHealthDataService_HV\QueryHealthDataService_HV.asmx.cs:line 429}

    I've handled source property in Plane Family History as well.Dont know what is the reason of FamilyHistoryV3 exception.Please let me know reason and solution for that.

    Monday, February 28, 2011 10:29 AM

Answers

  • Your application is likely authorized to the FamilyHistoryV3 type, which means when you fetch the item you will get back an instance of that type, which your application is not prepared to deal with. Unless you want to write code to deal with multiple versions, your application should only authorize one version of a specific type.

    You can find more information here.

    Monday, February 28, 2011 7:08 PM

All replies

  • Hello Ralgoo,

    There are 3 versions of Family History thing types in HealthVault  and you need to use the latest version of the data type. In this scenario you have not given the access to Family History #(v3) in the configuration of your application. Could you please provide all permissions to Family History #(v3) rule and try to access it.

    If you are not using the above mentioned scenario then please provide more information.

    Hope this helps and let me know if you need further information.

    Regards,

    Madan Kamuju


     


    Monday, February 28, 2011 2:13 PM
  • thank you Madan.I recently knew that this record has been inserted from Mayo clinic.I'll give you link of it.

    https://healthmanager.mayoclinic.com/

    You can use the same credentials that you use for Microsoft Healthvault.Once you enter record from Mayo clinic for specifically talking about plane Family History,you get source automatically as Mayo Clinic Health Manager.But I'm not getting the reason why the record becomes as a FamilyHistoryV3 record even if we've added simple 4 fields except source as above.Yes we can handle this through FamilyHistoryV3 as well.But I'm fetching both kind of records through object of plane Family History object such as

    foreach

     

    Thank you once again.

    (FamilyHistory Family in items)

    So how to handle this kind of stuff.

    Monday, February 28, 2011 2:38 PM
  • Your application is likely authorized to the FamilyHistoryV3 type, which means when you fetch the item you will get back an instance of that type, which your application is not prepared to deal with. Unless you want to write code to deal with multiple versions, your application should only authorize one version of a specific type.

    You can find more information here.

    Monday, February 28, 2011 7:08 PM
  • Thank you Eric for the link.It really works.
    Tuesday, March 1, 2011 11:47 AM