Microsoft Developer Network > Forums Home > HealthVault Forums > HealthVault Data Types > Can I add Medication Dose by value and Units from application ?
Ask a questionAsk a question
 

AnswerCan I add Medication Dose by value and Units from application ?

  • Tuesday, October 13, 2009 8:58 PMDevesh Koirala Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I was wondering if I can add the Medication dose by value and units in Healthvault with the use of new Medication data type ? I see the dose to be of GeneralMeasurement type in which only "display" properties is available for read/write. With the display properties, it would be set as a free text but I wanted to set by value and units. Any suggestions ?

    Thanks
    -Devesh

Answers

  • Wednesday, October 14, 2009 5:56 PMEric GunnersonMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    General measurent stores both a display value and an associated collection of structured measurements.

    In the .NET SDK, it would be something like:

    Medication medication = new Medication();
    medication.Dose = new GeneralMeasurement("300 mg");
    medication.Dose.Structured.Add(new StructuredMeasurement(300, new CodableValue(...));

All Replies

  • Wednesday, October 14, 2009 5:56 PMEric GunnersonMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    General measurent stores both a display value and an associated collection of structured measurements.

    In the .NET SDK, it would be something like:

    Medication medication = new Medication();
    medication.Dose = new GeneralMeasurement("300 mg");
    medication.Dose.Structured.Add(new StructuredMeasurement(300, new CodableValue(...));