Version: 2011.01.25

Krames StayWell External Web Service Documentation

This method has been deprecated.
Use the GetRelatedContent() method instead.

GetRelatedDocuments Method

This Method will return a small amount of meta-data for each document that is related to the document or MeSH IDs sent to the method. Each document in the UCR has been mapped to one or more MeSH Unique IDs, and these IDs are used to relate the documents returned by this method. The ranking number will range from 1 to 5, with 1 being the most related and 5 being the least.

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

<RelatedDocumentsRequest IncludeBlocked="[true, false]" IncludeOriginalDocuments="[true, false]">
	<MeSHList>
		<MeSH code="[MeSHUniqueID]"/>
		<MeSH code="[MeSHUniqueID]"/>
	</MeSHList>
	<Language code="[LanguageCode]"/>
</RelatedDocumentsRequest >

or in this format

<RelatedDocumentsRequest IncludeBlocked="[true, false]" IncludeOriginalDocuments="[true, false]">
	<DocumentID ContentTypeId="" ContentId="" IsCustom=""/>
	<Language code="[LanguageCode]"/>
</RelatedDocumentsRequest >

Use either the MeSHList element or the DocumentID element, but not both. (If both are used, the element that appears first will be applied, the latter will be ignored.)

  • The attributes in the RelatedDocumentsRequest element are optional.
  • The MeSHList can contain any number of MeSH elements.
  • The attributes in the DocumentID element are required.

The Language element is optional. If it is supplied, the search will be limited to documents in the identified language. If DocumentID is supplied but Language is not, the search will be limited to documents in the same language as the language of the identified document.

The code attribute in the Language element accepts an ISO standard language code, currently "en" (English) and "es" (Spanish).

Example requests

Return all English licensed content related to MeSH code "D000000":

<RelatedDocumentsRequest>
		<MeSHList>
				<MeSH code="D000000" />
		</MeSHList>
		<Language code="en"/> 
</RelatedDocumentsRequest>

Return all licensed content that shares the same language and one or more MeSH codes with ContentTypeID 1, ContentId 1:

<RelatedDocumentsRequest>
		<DocumentID ContentTypeId="1" ContentId="1"/>
</RelatedDocumentsRequest>

Sample Result XML

Result format is identical for both GetRelatedDocuments request types.

<?xml version="1.0" encoding="utf-8"?>
<DocumentList xmlns="http://ws.staywell.com">
	<Document ContentTypeId="1" ContentId="539" Rank="1" IsCustom="0">
		<Language code="en"/>
		<RegularTitle xmlns="http://ws.staywell.com/markup">Have a Constitution Like the Early Presidents</RegularTitle> 
	</Document>
	<Document ContentTypeId="1" ContentId="2016" Rank="3" IsCustom="0">
		<Language code="en"/>
		<RegularTitle xmlns="http://ws.staywell.com/markup">Exercising for Health and Longevity</RegularTitle> 
	</Document>
	<Document ContentTypeId="1" ContentId="2044" Rank="3" IsCustom="0">
		<Language code="en"/>
		<RegularTitle xmlns="http://ws.staywell.com/markup">Grow Older in Good Health</RegularTitle> 
	</Document>
	<ContentTypeTotals>
		<ContentTypeTotal ContentTypeId="1" Total="3" /> 
	</ContentTypeTotals>
</DocumentList>