Version: 2011.01.25

Krames StayWell External Web Service Documentation

GetLatestNews Method

This method returns a number of HealthDay news articles sorted by date, with the latest listed first.

Parameter names: XMLRequest
Expects an XML document in this format:

<Request MaxDocuments="[int > 0]" SearchPhrase="[string]" LanguageCode="[string]">
	<MeSHList>
		<MeSH code="[MeSHCode]"/>
		<MeSH code="[MeSHCode]"/>
	</MeSHList>
</Request>

The SearchPhrase, LanguageCode, and MeSHList parameters are optional.

The MaxDocuments attribute indicates the maximum number of articles to return. For example, if you specify a value of 10, but only eight articles match the search criteria, the results will have eight articles, but if 30 articles match the search criteria, then only the 10 most recent will be in the results.

Sample Request

http://external.ws.staywell.com/[SiteName]/Documents.svc/GetLatestNews?xmlrequest=<Request MaxDocuments="5" SearchPhrase="heart attack" LanguageCode="en"><MeSHList><MeSH code="D009203"/></MeSHList></<Request>

Sample Request XML

<Request MaxDocuments="5" SearchPhrase="heart attack" LanguageCode="en">

Sample Response XML:

<?xml version="1.0" encoding="utf-8" ?>
<DocumentList>
	<Document ContentTypeId="6" ContentId="632861" IsCustom="0">
	    <Language>en</Language>
	    <Direction>ltr</Direction>
	    <RegularTitle>Health Tip: Dealing With Peripheral Artery Disease</RegularTitle>
	    <Blurb><p>Get enough exercise</p></Blurb>
	    <Gender>All</Gender>
	    <PostingDate>2009-11-13T00:00:00-07:00</PostingDate>
	    <Version>Published</Version>
	</Document>
	<Document ContentTypeId="6" ContentId="632898" IsCustom="0">
	    <Language>en</Language>
	    <Direction>ltr</Direction>
	    <RegularTitle>Can a Bad Boss Make You Sick?</RegularTitle>
	    <Blurb><p>Study ties poor supervisors to higher odds for heart attack</p></Blurb>
	    <Gender>All</Gender>
	    <PostingDate>2009-11-06T00:00:00-07:00</PostingDate>
	    <Version>Published</Version>
	</Document>
</DocumentList>