Microsoft Developer Network >
Forums Home
>
HealthVault Forums
>
HealthVault Data Types
>
Problem Updating Immunization Record
Problem Updating Immunization Record
- I am facing a problem during updating the Immunization Record.
First I tried to get the immunization collection, than tried to update each record. Code block is as follows:
I tried to get collection by the Immunization.TypeID ("3d817dbe-af42-4a9d-a553-d1298b4d08fc ") and "cd3587b5-b6e1-4565-ab3b-1c3ad45eb04f "List<HealthRecordItem> immunizationList = GetValues<HealthRecordItem>(new Guid("cd3587b5-b6e1-4565-ab3b-1c3ad45eb04f" )); // Immunization.TypeId
if (immunizationList != null && immunizationList.Count > 0)
{
foreach (HealthRecordItem hrItem in immunizationList)
{
try { PersonInfo.SelectedRecord.UpdateItem(hrItem); } catch (Exception ex)
{ System.Diagnostics.Trace.Write( ex.Message ); } } }
But for updating I am getting the same error as follows:
"The thing type specified in the update, '3d817dbe-af42-4a9d-a553-d1298b4d08fc', is an older version than the type of the existing instance"
Please give a solution to recover from this error... :( :(
Answers
- There are two versions of the Immunization type. Because newer versions of types typically have additional data associated with them, the platform does not allow you to update those types with the older version - this could lead to data loss.
The types that come back are dependent not on the typeid you ask for, but on the type(s) that your application is authorized to access. My guess is that your app is only authorized to view the old immunization version, and therefore you can't do the update.
You currently can't see which version is which in the application configuration center, but that will be fixed in the next couple of days with our new release, and this will make that easier.
You also need to have an SDK that has the newest version in it.- Marked As Answer byEric GunnersonMSFT, ModeratorFriday, June 26, 2009 5:05 PM
All Replies
- There are two versions of the Immunization type. Because newer versions of types typically have additional data associated with them, the platform does not allow you to update those types with the older version - this could lead to data loss.
The types that come back are dependent not on the typeid you ask for, but on the type(s) that your application is authorized to access. My guess is that your app is only authorized to view the old immunization version, and therefore you can't do the update.
You currently can't see which version is which in the application configuration center, but that will be fixed in the next couple of days with our new release, and this will make that easier.
You also need to have an SDK that has the newest version in it.- Marked As Answer byEric GunnersonMSFT, ModeratorFriday, June 26, 2009 5:05 PM

