Health portal/Step3b

Jump to: navigation, search

Anatomy of a typical MedLinePlus topic page

Please note that for the purposes of this illustration, some of the whitespace and indenting has been modified. I've also removed some repetitive sections of HTML (clearly marked) but most of the meaningful HTML code is in place and in the order it is usually found in a MedLinePlus topic page to demonstrate the structure used by MedLine Plus.

The abdominalpain.html topic page dissected

see and "View source" for the original.

ACTION: Except for some needed and valid HTML header lines, all of the following header section will be removed.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="EN">
    <script type="text/javascript">
        imageNames = false;
    <link rel="stylesheet" 

href="" type="text/css">
    <link rel="shortcut icon" 

href="" type="image/x-icon">
    <!--[if IE]>
        <style type="text/css">
        .alist ul { margin-top:3;}

    <style type="text/css">
    @import url(;
    @import url(;
    @import url(;

ACTION: This next section contains the page-specific title and also Dublin Core metadata. It would be nice to find a suitable way to preserve this metadata because it might be useful later. For instance, if something like the DITA architecture being explored by Projects/Wikislice were used for content management.

    <title>MedlinePlus: Abdominal Pain</title>

    <meta http-equiv="Content-Type"     content="text/html; charset=UTF-8">
    <meta http-equiv="Content-Language" content="en-us">
    <meta name = "description" content ="Abdominal Pain">
    <!-- meta data -->
    <meta name="keywords" content="Abdominal Pain, Pain, Abdominal">
    <link rel="schema.DC" href="" title="The Dublin 

Core metadata Element Set">
    <meta name="DC.Title" content="Abdominal Pain">
    <meta name="DC.Title.Alternate" content="Pain, Abdominal"> <meta 

name="DC.Subject.MeSH" content="Abdominal Pain"> <meta name="DC.Subject.MeSH" 

content="Digestive System"><meta name="DC.Subject.MeSH" content="Digestive System 

Diseases"><meta name="DC.Subject.MeSH" content="Pathologic Processes"><meta 

name="DC.Subject.MeSH" content="Signs and Symptoms"> <meta name="DC.Relation.IsPartOf" 

content="Digestive System"><meta name="DC.Relation.IsPartOf" content="Symptoms">
    <meta name="DC.Identifier.URL" 

    <meta name="DC.Publisher" content="National Library of Medicine">
    <meta name="DC.Language" content="eng">
    <meta name="DC.Type" content="Text">
    <meta name="DC.Date.Modified" content="2008-06-25">    
    <meta name="NLMDC.Date.Modified.Major" content="2008-05-13">
    <meta name="DC.Date.Created" content="2003-01-07">

ACTION: The javascript below can be deleted as it does things that are specific to the MedLinePlus site as hosted at NLM.

    <script type="text/javascript" 

    <script type="text/javascript" 


<link rel="alternate" type="application/rss+xml" title="What's New on MedlinePlus" 


ACTION: The statement below marks the end of the header section and should be kept. Some sort of additional global header (besides the page-specific title and metadata) will be developed for use, maybe containing a nice little icon or something.


ACTION: The next part is the NLM header branding, which should be left out. Attribution and link to original source will be added back in below, probably just above new footer.

<MAP NAME="nlmnih"><AREA SHAPE="rect" title="U.S. National Library of Medicine" 

alt="U.S. National Library of Medicine" COORDS="200,14,420,25" 



target="TheNewWin"><AREA SHAPE="rect" title="National Institutes of Health" 

alt="National Institutes of Health" COORDS="219,35,419,45" HREF="" 



ACTION: The start-of-body tag should be preserved.


ACTION: The stuff below that is specific to IE7 can probably go away.

    <!--[if !IE 7]>
    width:expression(document.body.clientWidth > 1280 ? "1250px" : 

(document.body.clientWidth < 815 ? "800px" : "99%" ) ); }
    </style> <![endif]-->
    <div id="skipnav">
    <a href="#skip" title="Skip navigation links and go to the page content">Skip 


ACTION: The HTML below produces most of the tabs (that take you to non-free content), this will be deleted.

    <div id="body">
    <table id="toptable">
      <td><a href=""><IMG 


title="MedlinePlus Trusted Health Information for You" ALT="MedlinePlus Trusted Health 

Information for You" BORDER="0" HEIGHT="65" WIDTH="325"></a></td>
      <td width="100%" height="65" 


src="" width="100%" 

height="65" border="0" title="MedlinePlus Trusted Health Information for You" 

ALT="MedlinePlus Trusted Health Information for You"></td>

src="" border="0" 

height="65" width="425" USEMAP="#nlmnih" title="MedlinePlus Trusted Health Information 

for You" ALT="MedlinePlus Trusted Health Information for You"></td>
    <div id="topcontainer">
<form method="get" action="" 

title="Site Search input"  target="_self" id="searchform" name="searchform">

<input type="hidden" name="v:project" value="medlineplus">

    <input type="text" name="query" size="20" maxlength="250" style="height:24px;">
    <input type="image" 

src=""  align="absmiddle" 

border="0" title="Search MedlinePlus" alt="Search MedlinePlus"></form>



src="" title="Contact Us" 

alt="Contact Us"></a>
    <a href=""><img 

src="" title="FAQs" alt="FAQs"></a>
    <a href=""><img 

src="" title="Site Map" alt="Site 

Map" ></a>
    <a href=""><img 

src="" title="About MedelinePlus" 

alt="About MedelinePlus"></a>
    <div style="clear:both;"></div>
    <div id="mainmenu">
        <a href="" title="Home" 

id="tab0" ></a>
        <a href="" title="Health 

Topics" id="stab21" style="cursor:pointer;"></a>
        <a href="" title="Drugs 

& Supplements" id="tab20" ></a>
        <a href="" title="Medical 

Encyclopedia" id="tab33" ></a>
        <a href="" 

title="Dictionary" id="tab1" ></a>
        <a href="" title="News" 

id="tab38" ></a>
        <a href="" 

title="Directories" id="tab11" ></a>
        <a href="" title="Other 

Resources" id="tab22" ></a>       
    <div style="float:right;">
	<a href=""><img 

src="" title="español" 

alt="español" border="0"></a>

<div style="clear:left;"></div>

<style type="text/css">

@import url("");

<script language="JavaScript">
    function onLoad() {
        if ( !window.opener ) return;
        if (typeof window.opener.siteEntryWin != "undefined") {
            if (!window.opener.siteEntryWin.closed) {
                if (typeof window.opener.siteEntryWin.RestartTimer != "undefined") {


ACTION: This next section poses an interesting problem. In combination with the cascading style sheet, it generates the alphabetical link list. It would be nice to have such a feature, but how to do it in multiple languages? If you have any ideas, please leave them on the talk page. In any event, this is a large enough block of text that should probably not be reproduced hundreds of times, and so it will be deleted, but some thought needs to go into replacing it's function in some way.

<h5 class="menutitle">Other Health Topics:</h5>
<div class="alist">

<li><a href="">A</a></li>
<li><a href="">B</a></li>
<li><a href="">C</a></li>
<li><a href="">D</a></li>
<li><a href="">E</a></li>
<li><a href="">F</a></li>
<li><a href="">G</a></li>
<li><a href="">H</a></li>
<li><a href="">I</a></li>
<li><a href="">J</a></li>
<li><a href="">K</a></li>
<li><a href="">L</a></li>
<li><a href="">M</a></li>
<li><a href="">N</a></li>
<li><a href="">O</a></li>
<li><a href="">P</a></li>
<li><a href="">Q</a></li>
<li><a href="">R</a></li>
<li><a href="">S</a></li>
<li><a href="">T</a></li>
<li><a href="">U</a></li>
<li><a href="">V</a></li>
<li><a href="">W</a></li>
<li><a href="">XYZ</a></li>
<li><a href="">List of All 



ACTION: We don't need "printer friendly" or "e-mail to a friend" features. In addition, the images associated with topics are mostly non-free, this gets deleted. It might be possible to find or create other images to use, but only if they add meaning, otherwise they just take up space.

<div id="sidecolumn">
    <div id="topimage">
        <a href=""  

onclick="openNakedWin('PrintWin');" target="PrintWin"><img 


title="Printer-friendly version" alt="Printer-friendly version"/></a>



onclick="openNakedWin('EmailReqWin')" target="EmailReqWin"><img 

src="" title="E-mail this 

page to a friend" alt="E-mail this page to a friend"/></a>

    <div id="topicimage">
    <img src="" 

title="Photograph of a woman clutching her stomach in pain" alt="Photograph of a woman 

clutching her stomach in pain" height="230" width="222"></img>

ACTION: The "Related Topics" information should be kept. These are links to other pages within the bundle. Of course, they need to be refactored to work in the new page structure (and for off-line use).

    <div id="tabbedBoxes">
        <li class="tabbedBox">
        <h3>Related Topics</h3>





ACTION: The "GoLocal section" is entirely U.S. specific and needs to be removed.

        <li class="tabbedBox">
        <h3>Go Local</h3>


                Services and providers for <strong>Abdominal Pain</strong> in the U.S.
<div class="golocal20">
<form name="goLocal" 


onsubmit="return false;">
<select name="state"><option value="">Select Location</option>



vice_type=topic&invokedby=services&service_id=351&ntopic_id=3061">AL - Alabama</option> 


ervice_type=topic&invokedby=services&service_id=351&ntopic_id=3061">AR - 


Arizona to Vermont removed for this dissection



vice_type=topic&invokedby=services&service_id=351&ntopic_id=3061">WY - Wyoming</option> 
<input class="img" src="" alt="Go" 




<a href="">Select from 



ACTION: We finally get to the "Main Content" section. This is the good stuff, it seems way too short compared to the rest of it.

<div id="maincontent">
    <div id="skip">
        Abdominal Pain 
    <div id="synonyms">
    Also called: Bellyache
    <span id="tpsummary">
Your abdomen extends from below your chest to your groin. Some people 
call it the stomach, but your abdomen contains many other important 
organs. Pain in the abdomen can come from any one of them. The pain 
may start somewhere else, such as your chest. 

Severe pain doesn't always mean a serious problem. Nor does mild pain 
mean a problem is not serious. 

Call your healthcare provider if mild pain lasts a week or more or 
if you have pain with other symptoms. Get medical help immediately 
     <li>You have abdominal pain that is sudden and sharp</li>
     <li>You also have pain in your chest, neck or shoulder</li>
     <li>You're vomiting blood or have blood in your stool</li>
     <li>Your abdomen is stiff, hard and tender to touch</li>
     <li>You can't move your bowels, especially if you're also vomiting</li>

ACTION: This "Start here" section and all the sections below, down to the footer are too U.S. specific and need to be removed. Ideally, local links can be placed here by local Ministry of Health. For some topics, it may be worth the effort to research suitable links to the WHO (or for South America, PAHO) web-sites.

  • Sometimes there is a "Languages" or a "Games" section, this might be worth preserving in some form, but exactly how to use this needs to be worked out (keep link or harvest localized text from linked page).
    <div id="_start_">
        <span class="categoryname"><a name="cat51"></a>Start Here</span>
        <ul class="bulletlist">            




target="TheNewWin" >Abdominal Pain, Long-Term</a></span><span class="orgs">(American 

Academy of Family Physicians)</span> 
A whole lot of stuff removed for this dissection




target="TheNewWin" >Mittelschmerz</a></span><span class="orgs">(Mayo Foundation for 

Medical Education and Research)</span> 
        <a href="#skip" class="toTop">Return to top</a>

<div class="spacer"></div>

ACTION: The footer will mostly be replaced by an attribution section preserving some of this info and by a newly designed XO Health Portal footer. The closing body and html tags will be needed.

    <table class="footer" cellspacing="0" cellpadding="0">
        <td colspan="2" class="tabLinks"><a href="">Home</a> | <a 

href="">Health Topics</a> | <a 

href="">Drugs & 

Supplements</a> | <a 

href="">Encyclopedia</a> | 
<a href="">Dictionary</a> | <a 

href="">News</a> | 
<a href="">Directories</a> | 
<a href="">Other Resources</a> 

      <tr class="footBody">
        <td><a href="">Copyright</a> | 

<a href="">Privacy</a> | <a 

href="">Accessibility</A> | <a 

href="">Quality Guidelines</a><br>
          <a href="" 


target="TheNewWin">U.S. National Library of Medicine</A>, 8600 Rockville Pike, 

Bethesda, MD 20894 <br>
          <a href=""  


target="TheNewWin">National Institutes of Health</A> | <a href="" 


target="TheNewWin"> Department of Health & Human Services</a> </td>
        <td class="updated">Date last updated: 25 June 2008 <br>Topic last reviewed: 13 

May 2008</td>



Automating the parsing of health topic pages

User:Karmaflux very kindly provided a nice exemplar perl script for running through and parsing these health topic HTML pages. This script is now being modified to include some additional special case requirements, e.g. sections not found on every health topic page, but still useful like Games or Languages. The basic logic is to turn on accumulation of text lines when certain unique start flag strings are recognized and to turn text line accumulation off when other lines (recognizable as the end of useful sections) are seen. The script will also add back in header and footer and housekeeping HTML (head and body tags) to accomplish an automated parsing of the HTML pages as downloaded from NLM into pages that have been trimmed down to the essentials for the XO health portal.

The perl source code of the parsing script will be posted here under MIT license when it is ready in final form. Cjl 05:13, 10 July 2008 (UTC)

Go to next section - Step 4

Return to Health portal main page