locked
Lab Results RRS feed

  • Question

  • I am attempting to add LabResults to your Java SDK's Wicket example. I build up a LabResults instance in .Net  and attempt to add to HealthVault and capture the Xml in the proces. From this xml I was hoping to template into Java.

    I cannot add a LabResult, though, using the .Net SDK. There are several threads on how the Thing Types Schemas are not in sync with the SDK. What I'm wondering is does this work at all? Do you currently support adding/fetching Lab Results. This is a complete work stopper if you don't.

    By support, all I'd need is an example xml document that works with the server and affirmation that the server is coded to support that type/version.

    Here's my test case:

    [Test]
            public void AddLabResults()
            {
                LabResults labs = new LabResults(new HealthServiceDateTime(DateTime.Now));
                labs.LaboratoryName = new CodableValue("Labco Situation Niner");
                LabGroupType group = new LabGroupType("A great grouping");
                labs.LabGroup = group;
                Microsoft.Health.ItemTypes.LabTestType one = new Microsoft.Health.ItemTypes.LabTestType();
                one.Name = "Calcium Test";
                one.Substance = new CodableValue("CALCIUM", new CodedValue("17861-6", "LOINC", "", ""));
                one.Status = new CodableValue("F");
                LabResultType result = new LabResultType();
                one.Result = result;
                result.Value = 9.1;
                result.Unit = new CodableValue("mg/dl");
                group.LabTests.Add(one);
                CaptureXml(labs);
                HealthVaultLabResults hvLabs = new HealthVaultLabResults(labs);
                List<IHealthVaultItem> all = new List<IHealthVaultItem>();
                all.Add(hvLabs);
                ((HealthVaultEntityManager) ObjectFactory.Get("HealthVaultEntityManager")).AddOrUpdate(          HealthVaultUsers.PATIENT5, all);
            }

    With Xml:

    <?xml version="1.0" encoding="utf-16"?>
    <lab-results>
      <when>
        <date>
          <y>2008</y>
          <m>6</m>
          <d>19</d>
        </date>
        <time>
          <h>10</h>
          <m>20</m>
          <s>40</s>
        </time>
      </when>
      <laboratory-name>
        <text>Labco Situation Niner</text>
      </laboratory-name>
      <lab-group>
        <group-name>a great grouping</group-name>
        <lab-tests>
          <when>
            <date>
              <y>2008</y>
              <m>6</m>
              <d>19</d>
            </date>
          </when>
          <name>good test!</name>
          <substance>
            <text>CALCIUM</text>
            <code>
              <value>17861-6</value>
              <type>LOINC</type>
            </code>
          </substance>
          <result>
            <value>9.1</value>
            <unit>
              <text>mg/dl</text>
            </unit>
          </result>
          <status>
            <text>F</text>
          </status>
        </lab-tests>
      </lab-group>
    </lab-results>

    Microsoft.Health.HealthServiceException: Invalid xml for thing. The 'urn:com.microsoft.wc.thing.lab-test-results:lab-results' element is not declared.

    I attempted to buld valid xml by hand via:
    http://developer.healthvault.com/types/schema.aspx?id=f57746af-9631-49dc-944e-2c92bee0d1e9

    But everything is out of sync (i.e. the xml marshalled from the sdk's lab group is completely different etc, etc)

    I am hitting:
    https://platform.healthvault-ppe.com/platform/wildcat.ashx

    And do not know how to determine my SDK version.

    Thanks very much,

    Colin S. Brown
    Thursday, June 19, 2008 5:21 PM

Answers

  • From the xml you generated, it looks like your using old HealthVault SDK libraries. For Lab Test Results, you'll need the latest dlls, Microsoft.Health.ItemTypes.dll version 0.9.1730.2919 in particular. The root element of the xml above should be "lab-test-results", and "labratory-name" should be a child of "lab-group".

    Thursday, June 19, 2008 8:35 PM
  • Our goal is always to have types remain compatible. We relaxed it in this case after checking that nobody was currently using the lab results type, but we forgot that people might use it before they picked up a new SDK. We won't do that in the future.

     

    On the development server, the HelloWorld application is provisioned to access all data types. We don't do that for partner application IDs because it makes the process of going live much harder.

     

    You can easily add lab results to your app id through the new self-service application configuration center.

     

    Friday, June 20, 2008 4:48 PM
  • We are unlikely to remove the online/offline distinction. It's very important the users understand exactly what data access they are granting to an application, and the online/offline distinction is part of that.

     

    Part of the go-live process involves us vetting the data types that you are accessing against the kind of application you are building and what scenarios you want to support. To make this process as straightforward as possible (and to make users more likely to grant access), we need to keep the list of data types as small as possible. The application cannot go live until the data types requested match the set of data types that are used. We also require the application to explain why each data type is requested so that the user can better understand what the application is doing, and that process is much easier with a smaller set of data types.

     

    This approach is different than the approach some other systems take, and that's because of the importance we place on consumer information and control.

     

    I don't understand your comment about test-driven development. If I was using TDD to write a HealthVault app, I'd build a proxy on top of the HV layer and then add appropriate mock/fake test objects, and all of my tests would talk to the mock/test objects, not the real HealthVault api.

     

    I should also note that the decision to use offline is something else we look at as part of go live. It's appropriate for many apps - especially those that connect to existing systems - but in general it's not appropriate for apps that can easily be written as web apps.

    Friday, June 20, 2008 9:29 PM

All replies

  • From the xml you generated, it looks like your using old HealthVault SDK libraries. For Lab Test Results, you'll need the latest dlls, Microsoft.Health.ItemTypes.dll version 0.9.1730.2919 in particular. The root element of the xml above should be "lab-test-results", and "labratory-name" should be a child of "lab-group".

    Thursday, June 19, 2008 8:35 PM
  • sideshowdan,

    Thanks! That was really great help. I would have expected some 'higher level' warning about client/server version incompatibility issues. I'm now onto 'Unauthorized' because my ApplicationId was not 'setup' with Lab Results...Sure would be nice to have the development server offer up 'full access' to everything, the staging servers provide an integration point, etc.

    Sincerely,

    colin s brown
    Thursday, June 19, 2008 10:40 PM
  • Our goal is always to have types remain compatible. We relaxed it in this case after checking that nobody was currently using the lab results type, but we forgot that people might use it before they picked up a new SDK. We won't do that in the future.

     

    On the development server, the HelloWorld application is provisioned to access all data types. We don't do that for partner application IDs because it makes the process of going live much harder.

     

    You can easily add lab results to your app id through the new self-service application configuration center.

     

    Friday, June 20, 2008 4:48 PM
  • Eric,

    Thank you for your reply and explanation.

    My company, however, is attempting to provide middle-tier application support to our clients. To do so, we cannot and do not want to run a browser every time we interact with the HealthVault api. Such a process is cumbersome enough when using the .Net api and is exponentially harder when using the Java api (since HealthVaultPage is not available).

    Other health api's use an online component to assure user interaction but then allow for the 'token' delivered through that mechanism to be called by mid-tier calls thereafter with no on/offline distinction. From our perspective, this allows for easier test driven development. 

    So, in short, what would make our development times shorter would be to either allow the sample application to grant all (on offline and online) and/or remove the distinction all together.

    Sincerely,

    Colin S. Brown
    Friday, June 20, 2008 5:04 PM
  • We are unlikely to remove the online/offline distinction. It's very important the users understand exactly what data access they are granting to an application, and the online/offline distinction is part of that.

     

    Part of the go-live process involves us vetting the data types that you are accessing against the kind of application you are building and what scenarios you want to support. To make this process as straightforward as possible (and to make users more likely to grant access), we need to keep the list of data types as small as possible. The application cannot go live until the data types requested match the set of data types that are used. We also require the application to explain why each data type is requested so that the user can better understand what the application is doing, and that process is much easier with a smaller set of data types.

     

    This approach is different than the approach some other systems take, and that's because of the importance we place on consumer information and control.

     

    I don't understand your comment about test-driven development. If I was using TDD to write a HealthVault app, I'd build a proxy on top of the HV layer and then add appropriate mock/fake test objects, and all of my tests would talk to the mock/test objects, not the real HealthVault api.

     

    I should also note that the decision to use offline is something else we look at as part of go live. It's appropriate for many apps - especially those that connect to existing systems - but in general it's not appropriate for apps that can easily be written as web apps.

    Friday, June 20, 2008 9:29 PM
  • Hi Colin S. Brown,

    We are the indian based software company. Looking for implement LOINC codes in to our EMR. We have only LOINC database. Please provide me some steps to implement LOINC codes in to our EMR. We already referred LOINC and RELMA user manuals.

    having few (basic) doubts regarding LOINC implementation:

    1. Our main aim to order a lab or clinical test using LOINC database(codes).
    2. Wants to implement LOINC in to our EMR without using HL7 (using servlets and jsp (java)).
    3. Wants to view the lab or clinical test results.
    4. We are using java for implementation.
    5. Please give me some basic idea on implementing LOINC data base in to EMR.
    6. and also please provide us any opensource projects for implementing this.
    7. Is Component name is same as Test name in LOINC Database.

    Please provide us some documents or opensource projects or some steps or sample code (Example) regarding LOINC codes implementation in to EMR.

    Thanks in Advance.

    Regards,

    Praveen


    Tuesday, November 3, 2009 11:22 AM
  • Hi sideshowdan,

    We are the indian based software company. Looking for implement LOINC codes in to our EMR. We have only LOINC database. Please provide me some steps to implement LOINC codes in to our EMR. We already referred LOINC and RELMA user manuals.

    having few (basic) doubts regarding LOINC implementation:

    1. Our main aim to order a lab or clinical test using LOINC database(codes).
    2. Wants to implement LOINC in to our EMR without using HL7 (using servlets and jsp (java)).
    3. Wants to view the lab or clinical test results.
    4. We are using java for implementation.
    5. Please give me some basic idea on implementing LOINC data base in to EMR.
    6. and also please provide us any opensource projects for implementing this.
    7. Is Component name is same as Test name in LOINC Database.

    Please provide us some documents or opensource projects or some steps or sample code (Example) regarding LOINC codes implementation in to EMR.

    Thanks in Advance.

    Regards,

    Praveen

    Tuesday, November 3, 2009 11:28 AM