New to HealthVault Application Development

Jun 11, 2012 at 11:35 AM

Hi,

I am new to HealthVault Application development in Java.

So please tell that how to start with your SDK(R1.3.1).

Also please elaborate the steps in HealthVault application development.

Coordinator
Jun 12, 2012 at 5:16 PM

Hi,

You can get started with this library by following the directions here.  Also, you can have a look at general HealthVault information at the MSDN site here.

--Rob

Jun 14, 2012 at 6:46 AM

Thanks Rob.

Actually through your code i get the understanding of HealthVault application but i need some more clarification to start my HealthVault application.

One more thing to know about request methods and in that request how info tag is used to setinfo with request.

As in your WeightDAO the code is

public List<WeightInfo> getWeights()
    {
        final List<WeightInfo> weightList = new ArrayList<WeightInfo>();
       
        Request request = new Request();
        request.setMethodName("GetThings");
        request.setInfo("<info><group max=\"30\"><filter><type-id>" +
                WeightInfo.WeightType +
                "</type-id></filter><format><section>core</section><xml/></format></group></info>");
       
        RequestTemplate template = new RequestTemplate(connection);
        return template.makeRequest(request, new Marshaller<List<WeightInfo>>() {
            public List<WeightInfo> marshal(InputStream istream) throws Exception {
                InputSource isource = new InputSource(istream);
                XPath xpath = XPathFactory.newInstance().newXPath();
                String exp = "//thing";
                NodeList things = (NodeList)xpath.evaluate(exp,
                        isource,
                        XPathConstants.NODESET); 
               
                int count = Math.min(50, things.getLength());
                for (int i=0; i<count; i++)
                {
                    Node thing = things.item(i);
                    String weight = xpath.evaluate("data-xml/weight/value/display", thing);
                    String id = xpath.evaluate("thing-id", thing);
                    weightList.add(new WeightInfo(id, weight));
                } 
                return weightList;
            }
        });       
    }

 

In this i have highlighted the code which i want to know about, how filters are used and filters description.

In your code you take the weight info.But suppose i need some more information than what should i do?

I am giving you overview what i need to develop in my application.I need that from my HeathVault application i can get(extract) the information of a person.That information may be Medication information,Weight information,Body Vital information etc.

So please tell how i can go ahead by using your SDK(R1.3.1).

Coordinator
Jun 18, 2012 at 6:55 PM

Hi,

You might find it easier to use the JAXB classes to marshal the XML.  You can find an example under examples/ui-jaxb in the source tree.  Also, looking at the jaxb unit tests may help you explore the api.

You can find details about the XML interface at developer.healthvault.com.  It's better to ask questions about HealthVault's api over there.

Thanks,

Rob