text:
var Walk = require('./scripts/walk.js');

var options = {
	write: true, // false: don't write files, just log what you WOULD do if you ran it
	logSuccesses: true // false: don't log successful files.  good for looking at only the failures / weird files
};
var year = '2006';
var month = '11';
var day = '10';

Walk.year(year, options);
//Walk.month(year, month, options);
//Walk.day(year, month, day, options);


text:
namespace WebLinq
{
    using System;
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using System.Linq;
    using System.Reactive;

    public interface ISubmissionData<out T>
    {
        T Run(NameValueCollection data);
    }

    public interface ISubmissionDataAction<out T> : ISubmissionData<Unit>
    {
        ISubmissionData<T> Return();
    }

    static class FormSubmissionAction
    {
        public static SubmissionDataAction<T> Create<T>(ISubmissionData<T> submission) =>
            new SubmissionDataAction<T>(submission);
    }

    public sealed class SubmissionDataAction<T> : ISubmissionDataAction<T>
    {
        readonly ISubmissionData<T> _submission;

        public SubmissionDataAction(ISubmissionData<T> submission) =>
            _submission = submission ?? throw new ArgumentNullException(nameof(submission));

        public Unit Run(NameValueCollection data)
        {
            _submission.Run(data);
            return Unit.Default;
        }

        public ISubmissionData<T> Return() => _submission;
    }

    public static partial class SubmissionData
    {
        public static ISubmissionData<T> Create<T>(Func<NameValueCollection, T> runner) =>
            new DelegatingSubmission<T>(runner);

        sealed class DelegatingSubmission<T> : ISubmissionData<T>
        {
            readonly Func<NameValueCollection, T> _runner;

            public DelegatingSubmission(Func<NameValueCollection, T> runner) =>
                _runner = runner ?? throw new ArgumentNullException(nameof(runner));

            public T Run(NameValueCollection data) =>
                _runner(data ?? throw new ArgumentNullException(nameof(data)));
        }

        public static ISubmissionData<T> Return<T>(T value) => Create(_ => value);

        public static ISubmissionData<TResult> Bind<T, TResult>(this ISubmissionData<T> submission, Func<T, ISubmissionData<TResult>> selector) =>
            Create(env => selector(submission.Run(env)).Run(env));

        public static ISubmissionData<TResult> Select<T, TResult>(this ISubmissionData<T> submission, Func<T, TResult> selector) =>
            Create(env => selector(submission.Run(env)));

        public static ISubmissionData<TResult> SelectMany<TFirst, TSecond, TResult>(
            this ISubmissionData<TFirst> submission,
            Func<TFirst, ISubmissionData<TSecond>> secondSelector,
            Func<TFirst, TSecond, TResult> resultSelector) =>
            Create(env =>
            {
                var t = submission.Run(env);
                return resultSelector(t, secondSelector(t).Run(env));
            });

        public static ISubmissionData<TResult> SelectMany<T, TResult>(
            this ISubmissionData<T> submission,
            Func<T, ISubmissionData<TResult>> resultSelector) =>
            submission.SelectMany(resultSelector, (_, r) => r);

        public static ISubmissionData<IEnumerable<TResult>> For<T, TResult>(IEnumerable<T> source,
            Func<T, ISubmissionData<TResult>> f) =>
            Create(data => source.Select(f).Select(e => e.Run(data)).ToList());

        internal static ISubmissionData<T> Do<T>(this ISubmissionData<T> submission, Action<NameValueCollection> action) =>
            submission.Bind(x => Create(env => { action(env); return x; }));

        internal static ISubmissionData<Unit> Do(Action<NameValueCollection> action) =>
            Create(env => { action(env); return Unit.Default; });
    }
}

namespace WebLinq
{
    using System;
    using System.Collections.Generic;
    using System.Collections.Specialized;
    using System.Linq;
    using System.Text.RegularExpressions;
    using Collections;
    using Mannex.Collections.Generic;
    using Mannex.Collections.Specialized;
    using Unit = System.Reactive.Unit;

    public static partial class SubmissionData
    {
        /// <summary>
        /// Represents nothing.
        /// </summary>

        public static readonly ISubmissionData<Unit> None = Do(delegate { });

        /// <summary>
        /// Get the names of all the fields.
        /// </summary>

        public static ISubmissionData<IReadOnlyCollection<string>> Names() =>
            Create(data => data.AllKeys);

        /// <summary>
        /// Gets the value of a field identified by its name.
        /// </summary>

        public static ISubmissionData<string> Get(string name) =>
            Create(data => data[name]);

        /// <summary>
        /// Gets all the values of a field identified by its name.
        /// </summary>

        public static ISubmissionData<Strings> GetValues(string name) =>
            Create(data => Strings.Array(data.GetValues(name)));

        /// <summary>
        /// Removes a field from submission.
        /// </summary>

        public static ISubmissionData<Unit> Remove(string name) =>
            Do(data => data.Remove(name));

        /// <summary>
        /// Sets the value of a field identified by its name.
        /// </summary>

        public static ISubmissionData<Unit> Set(string name, Strings value)
            => value.Count == 0 ? Remove(name)
             : value.Count == 1 ? Do(data => data[name] = value[0])
             : Remove(name).Then(For(value, v => Do(data => data.Add(name, v))).Ignore());

        /// <summary>
        /// Sets the values of all fields identified by a collection of
        /// names to the same value.
        /// </summary>

        public static ISubmissionData<Unit> Set(IEnumerable<string> names, Strings value) =>
            from _ in For(names, n => Set(n, value))
            select Unit.Default;

        static ISubmissionDataAction<string> TrySet(Func<IEnumerable<string>, string> matcher, Strings value) =>
            FormSubmissionAction.Create(
                from ns in Names()
                select matcher(ns) into n
                from r in n != null
                        ? from _ in Set(n, value) select n
                        : Return((string) null)
                select r);

        /// <summary>
        /// Sets the value of a single field identified by a predicate function
        /// otherwise throws an error.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set.
        /// </returns>

        public static ISubmissionDataAction<string> SetSingleWhere(Func<string, bool> matcher, Strings value) =>
            TrySet(ns => ns.Single(matcher), value);

        /// <summary>
        /// Sets the value of a single field identified by a regular expression
        /// pattern otherwise throws an error.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set.
        /// </returns>

        public static ISubmissionDataAction<string> SetSingleMatching(string pattern, Strings value) =>
            SetSingleWhere(n => Regex.IsMatch(n, pattern), value);

        /// <summary>
        /// Attempts to set the value of a single field identified by a
        /// predicate function otherwise has no effect.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set or <c>null</c> if zero
        /// or multiple fields were identified.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetSingleWhere(Func<string, bool> matcher, Strings value) =>
            TrySet(ns => ns.SingleOrDefault(matcher), value);

        /// <summary>
        /// Attempts to Set the value of a single field identified by a
        /// regular expression pattern otherwise has no effect.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set or <c>null</c> if zero
        /// or multiple fields were identified.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetSingleMatching(string pattern, Strings value) =>
            TrySetSingleWhere(n => Regex.IsMatch(n, pattern), value);

        /// <summary>
        /// Sets the value of the first field identified by a predicate
        /// function otherwise throws an error if no field was identified.
        /// </summary>
        /// <returns>
        /// The name of the first field identified by the predicate function.
        /// </returns>

        public static ISubmissionDataAction<string> SetFirstWhere(Func<string, bool> matcher, Strings value) =>
            TrySet(ns => ns.First(matcher), value);

        /// <summary>
        /// Attempts to set the value of the first field identified by a
        /// predicate function otherwise has no effect if no field was
        /// identified.
        /// </summary>
        /// <returns>
        /// The name of the first field identified by the predicate function.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetFirstWhere(Func<string, bool> matcher, Strings value) =>
            TrySet(ns => ns.FirstOrDefault(matcher), value);

        /// <summary>
        /// Attempts to set the value of the first field identified by a
        /// regular expression pattern otherwise has no effect if no field was
        /// identified.
        /// </summary>
        /// <returns>
        /// The name of the first field identified by the predicate function.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetFirstMatching(string pattern, Strings value) =>
            TrySetFirstWhere(n => Regex.IsMatch(n, pattern), value);

        /// <summary>
        /// Sets the values of all fields identified by a predicate function
        /// to the same value.
        /// </summary>
        /// <returns>
        /// A sequence of field names that were identified by the predicate
        /// function and affected.
        /// </returns>

        public static ISubmissionDataAction<IEnumerable<string>> SetWhere(Func<string, bool> matcher, Strings value) =>
            FormSubmissionAction.Create(
                from ns in Names()
                select ns.Where(matcher).ToArray() into ns
                from _ in Set(ns, value)
                select ns);

        /// <summary>
        /// Sets the values of all fields identified by a regular expression
        /// pattern to the same value.
        /// </summary>
        /// <returns>
        /// A sequence of field names that matched and were affected.
        /// </returns>

        public static ISubmissionDataAction<IEnumerable<string>> SetMatching(string pattern, Strings value) =>
            SetWhere(n => Regex.IsMatch(n, pattern), value);

        public static ISubmissionData<Unit> Merge(NameValueCollection other) =>
            Do(data =>
            {
                var entries = from e in other.AsEnumerable()
                              from v in e.Value select e.Key.AsKeyTo(v);
                foreach (var e in entries)
                    data.Add(e.Key, e.Value);
            });

        /// <summary>
        /// Returns a copy of the form data as a
        /// <see cref="NameValueCollection"/>.
        /// </summary>

        public static ISubmissionData<NameValueCollection> Data() =>
            Create(data => new NameValueCollection(data));

        /// <summary>
        /// Clears all form data.
        /// </summary>

        public static ISubmissionData<Unit> Clear() =>
            Do(data => data.Clear());

        /// <summary>
        /// Changes the type of the submission to <seealso cref="Unit"/>.
        /// </summary>

        public static ISubmissionData<Unit> Ignore<T>(this ISubmissionData<T> submission) =>
            from _ in submission
            select Unit.Default;

        /// <summary>
        /// Continues one submission after another.
        /// </summary>

        public static ISubmissionData<T> Then<T>(this ISubmissionData<Unit> first, ISubmissionData<T> second) =>
            from _ in first
            from b in second
            select b;

        /// <summary>
        /// Combines the result of one submission with another.
        /// </summary>

        public static ISubmissionData<TResult>
            Zip<TFirst, TSecond, TResult>(
                this ISubmissionData<TFirst> first,
                ISubmissionData<TSecond> second,
                Func<TFirst, TSecond, TResult> resultSelector) =>
            from a in first
            from b in second
            select resultSelector(a, b);

        public static ISubmissionData<Unit> Collect(params ISubmissionData<Unit>[] submissions) =>
            submissions.AsEnumerable().Collect();

        public static ISubmissionData<Unit> Collect(this IEnumerable<ISubmissionData<Unit>> submissions) =>
            For(submissions, s => s).Ignore();
    }
}

namespace WebLinq.Html
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.RegularExpressions;
    using Collections;
    using static SubmissionData;

    public static class FormSubmissionData
    {
        static ISubmissionDataAction<string> TrySet(this HtmlForm form, Func<IEnumerable<string>, string> matcher, Strings value) =>
            FormSubmissionAction.Create(
                from ns in Return(from c in form.Controls select c.Name)
                select matcher(ns) into n
                from r in n != null
                    ? from _ in Set(n, value) select n
                    : Return((string) null)
                select r);

        /// <summary>
        /// Sets the value of a single field identified by a predicate function
        /// otherwise throws an error.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set.
        /// </returns>

        public static ISubmissionDataAction<string> SetSingleWhere(this HtmlForm form, Func<string, bool> matcher, Strings value) =>
            form.TrySet(ns => ns.Single(matcher), value);

        /// <summary>
        /// Sets the value of a single field identified by a regular expression
        /// pattern otherwise throws an error.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set.
        /// </returns>

        public static ISubmissionDataAction<string> SetSingleMatching(this HtmlForm form, string pattern, Strings value) =>
            form.SetSingleWhere(n => Regex.IsMatch(n, pattern), value);

        /// <summary>
        /// Attempts to set the value of a single field identified by a
        /// predicate function otherwise has no effect.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set or <c>null</c> if zero
        /// or multiple fields were identified.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetSingleWhere(this HtmlForm form, Func<string, bool> matcher, Strings value) =>
            form.TrySet(ns => ns.SingleOrDefault(matcher), value);

        /// <summary>
        /// Attempts to Set the value of a single field identified by a
        /// regular expression pattern otherwise has no effect.
        /// </summary>
        /// <returns>
        /// The name of the field whose value was set or <c>null</c> if zero
        /// or multiple fields were identified.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetSingleMatching(this HtmlForm form, string pattern, Strings value) =>
            form.TrySetSingleWhere(n => Regex.IsMatch(n, pattern), value);

        /// <summary>
        /// Sets the value of the first field identified by a predicate
        /// function otherwise throws an error if no field was identified.
        /// </summary>
        /// <returns>
        /// The name of the first field identified by the predicate function.
        /// </returns>

        public static ISubmissionDataAction<string> SetFirstWhere(this HtmlForm form, Func<string, bool> matcher, Strings value) =>
            form.TrySet(ns => ns.First(matcher), value);

        /// <summary>
        /// Attempts to set the value of the first field identified by a
        /// predicate function otherwise has no effect if no field was
        /// identified.
        /// </summary>
        /// <returns>
        /// The name of the first field identified by the predicate function.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetFirstWhere(this HtmlForm form, Func<string, bool> matcher, Strings value) =>
            form.TrySet(ns => ns.FirstOrDefault(matcher), value);

        /// <summary>
        /// Attempts to set the value of the first field identified by a
        /// regular expression pattern otherwise has no effect if no field was
        /// identified.
        /// </summary>
        /// <returns>
        /// The name of the first field identified by the predicate function.
        /// </returns>

        public static ISubmissionDataAction<string> TrySetFirstMatching(this HtmlForm form, string pattern, Strings value) =>
            form.TrySetFirstWhere(n => Regex.IsMatch(n, pattern), value);

        /// <summary>
        /// Sets the values of all fields identified by a predicate function
        /// to the same value.
        /// </summary>
        /// <returns>
        /// A sequence of field names that were identified by the predicate
        /// function and affected.
        /// </returns>

        public static ISubmissionDataAction<IEnumerable<string>> SetWhere(this HtmlForm form, Func<string, bool> matcher, Strings value) =>
            FormSubmissionAction.Create(
                from ns in Return(from c in form.Controls select c.Name)
                select ns.Where(matcher).ToArray() into ns
                from _ in Set(ns, value)
                select ns);

        /// <summary>
        /// Sets the values of all fields identified by a regular expression
        /// pattern to the same value.
        /// </summary>
        /// <returns>
        /// A sequence of field names that matched and were affected.
        /// </returns>

        public static ISubmissionDataAction<IEnumerable<string>> SetMatching(this HtmlForm form, string pattern, Strings value) =>
            form.SetWhere(n => Regex.IsMatch(n, pattern), value);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" id="s1f078db902132e"><title id="v7237b993b2d8bc">Hølen, Saltvedt, Fayers, Hjermstad, Loge, and Kaasa: Doloplus-2, a valid tool for behavioural pain assessment?</title><link rel="stylesheet" type="text/css" href="jats-preview.css" id="a8ff7092a9d861a">

Journal Information

Journal ID (nlm-ta): BMC Geriatr

Title: BMC Geriatrics

ISSN (electronic): 1471-2318

Publisher: BioMed Central

Article Information

External link: http://www.biomedcentral.com/1471-2318/7/29

Copyright statement: Copyright © 2007 Holen et al; licensee BioMed Central Ltd.

Copyright: 2007, Holen et al; licensee BioMed Central Ltd.

License (open-access, http://creativecommons.org/licenses/by/2.0):

This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Date received: 27 April 2007

Date accepted: 19 December 2007

Publication date (collection): 2007

Publication date (electronic): 19 December 2007

Volume: 7

Page: 29

PubMed ID: 18093294

Article Id (pmc): 2234400

Publisher ID: 1471-2318-7-29

DOI: 10.1186/1471-2318-7-29

Doloplus-2, a valid tool for behavioural pain assessment?

                           Jacob C Hølen[1]

Email: jacob.chr.holen@medisin.ntnu.no

                           Ingvild Saltvedt[2]

Email: ingvild.saltvedt@medisin.ntnu.no

                           Peter M Fayers[1][3]

Email: p.fayers@abdn.ac.uk

                           Marianne J Hjermstad[1][4]

Email: m.j.hjermstad@medisin.uio.no

                           Jon H Loge[1][5]

Email: j.h.loge@medisin.uio.no

                           Stein Kaasa[1][6]

Email: stein.kaasa@medisin.ntnu.no

                           [1] Pain and Palliation Research Group, Department of Cancer Research and Molecular Medicine, Faculty of Medicine, Norwegian University
                        of Science and Technology, Trondheim, Norway

                           [2] Geriatric Section, Medical Department, St. Olav's Hospital, Trondheim, Norway

                           [3] Department of Public Health, University of Aberdeen Medical School, Aberdeen, UK

                           [4] Department of Oncology, Ullevaal University Hospital HF Oslo, Norway

                           [5] Palliative Medicine Unit, Ullevaal University Hospital HF Oslo, Norway

                           [6] Palliative Medicine Unit, Department of Oncology and Radiotherapy, St. Olav's Hospital, Trondheim, Norway

Abstract

Background

The Doloplus-2 is used for behavioural pain assessment in cognitively impaired patients. Little data exists on the psychometric
                        properties of the Doloplus-2. Our objectives were to test the criterion validity and inter-rater reliability of the Doloplus-2,
                        and to explore a design for validations of behavioural pain assessment tools.

Methods

Fifty-one nursing home patients and 22 patients admitted to a geriatric hospital ward were included. All were cognitively
                        impaired and unable to self-report pain. Each patient was examined by an expert in pain evaluation and treatment, who rated
                        the pain on a numerical rating scale. The ratings were based on information from the medical record, reports from nurses and
                        patients (if possible) about pain during the past 24 hours, and a clinical examination. These ratings were used as pain criterion.
                        The Doloplus-2 was administered by the attending nurse. Regression analyses were used to estimate the ability of the Doloplus-2
                        to explain the expert's ratings. The inter-rater reliability of the Doloplus-2 was evaluated in 16 patients by comparing the
                        ratings of two nurses administrating the Doloplus-2.

Results

There was no association between the Doloplus-2 and the expert's pain ratings (R2 = 0.02). There was an association (R2 = 0.54) between the expert's ratings and the Doloplus-2 scores in a subgroup of 16 patients assessed by a geriatric expert
                        nurse (the most experienced Doloplus-2 administrator). The inter-rater reliability between the Doloplus-2 administrators assessed
                        by the intra-class coefficient was 0.77. The pain expert's ratings were compared with ratings of two independent geriatricians
                        in a sub sample of 15, and were found satisfactory (intra-class correlation 0.74).

Conclusion

It was challenging to conduct such a study in patients with cognitive impairment and the study has several limitations. The
                        results do not support the validity of the Doloplus-2 in its present version and they indicate that it demands specific administration
                        skills.

Background

Pain is common in elderly institutionalized patients, and prevalence rates ranging from 45% to 84% have been reported [1,2]. Cognitive impairment is also common in the same group, and more than 50% of nursing home residents have been found to be
               cognitively impaired [3,4]. A recent review reported prevalence rates in palliative care patients ranging from 14% to 44%, rising to 90% prior to death
               [5].

Proper pain assessment is a prerequisite for optimal pain treatment [6], but pain assessment is challenging in cognitively impaired patients. Pain is therefore often overlooked in these patients
               [3,7-10], leaving them at risk for sub-optimal pain treatment [7,11,12]. When feasible, self-report assessment of pain is regarded as the standard method [9,13]. In patients with mild to moderate cognitive impairment, studies have reported completion rates ranging from 47% to 100%
               for simple self-report tools such as numerical rating scales and verbal rating scales [3,10]. Ratings of present pain intensity have the highest completion rates, while self-report of other pain dimensions, like location,
               interference and temporal patterns, is more challenging [10].

Cognitive impairment can make self-report tools for pain assessment invalid and consequently limits their usefulness. Observational
               assessment of behaviour is an alternative. While self-report tools primarily assess communicative pain behaviours that are
               under the subject's control, observational tools assess behaviours that are more unconscious or automatic [14]. Behavioural assessment tools are therefore appropriate in subjects with impaired higher mental processes. However, thoroughly
               validated tools for behavioural assessment are scarce [10,15], and several reviewers have noted the lack of validation of the tools for behavioural pain ratings in the cognitively impaired
               [2,7,10,15-17]. Although data are limited, a recent review rated the psychometric aspects of 12 behavioural assessment tools according
               to several quality judgement criteria. Five tools (in English versions) received a satisfactory evaluation of validity and
               reliability [17]: the Abbey Scale [18], the Pain Assessment for the Dementing Elderly (PADE) [19], the Pain Assessment in Advanced Dementia Scale (PAINAD) [20], the Pain Assessment Checklist for Seniors With Limited Ability to Communicate (PACSLAC) [21], and the Doloplus-2 [22]. The review concluded by recommending the PACSLAC and the Doloplus-2, stating that they seem promising but required further
               testing [17].

The Doloplus, launched by Bernard Wary in 1992/93, was originally a 15-item clinical tool for proxy rating of pain in elderly
               patients with cognitive failure [22,23]. It was based on a tool for behavioural assessment of pain in children with neoplastic disease (Douleur Enfant Gustave Roussy
               scale) [22,23]. In 1995, the Doloplus was refined by a French/Swiss network of geriatricians, resulting in the present ten-item version
               (Doloplus-2 [22]). A Doloplus-2 assessment is performed by a proxy-rater who observes the subject and evaluates the presence of ten pain-related
               behaviours from 0 to 3 – representing increasing presence of the behaviour [22,24]. These include: verbal complaints, facial expressions, protective body postures, protection of sore areas, disturbed sleep,
               functional impairment in activities of daily living (washing and dressing, and general mobility), psychosocial reactions such
               as behavioural problems, and changes in communication or social life. Authors of the Doloplus-2 suggest a cut-off score of
               5 out of 30, representing possible pain being present [22,23], but this has not been empirically validated.

Despite a shortage of validation studies published in international journals and despite a call for thorough validation [25], including information on inter-rater reliability [17], the French version of the Doloplus-2 is in widespread clinical use in France and Switzerland [23]. This prompted us to undertake a Norwegian pilot validation study in 2004, in which we evaluated 59 patients who were institutionalized
               in nursing home units for the demented [24]. While well established protocols are available for the validation of self-report based assessment tools there is no consensus
               on how to validate tools for observational assessment. The objective of this pilot study was to translate the Doloplus-2 from
               French into Norwegian, to test the translation, explore the user-experiences, and evaluate the criterion validity of the Doloplus-2.
               The aim was to test the Doloplus-2 in patients who were unable to self-report and therefore we compared nurses' Doloplus-2
               scores to pain scores (pain criterion) given by pain experts who examined these patients (R2 = 62%). The results demonstrated satisfactory criterion validity in some domains. The Doloplus-2 item for facial expressions was the most informative, while the item for social life contributed least. All the three items forming the psychosocial domain (Communication, Social life, and Behavioural problems)
               were reported as problematic to conceptualize and contributed marginally to explain the expert pain score [24]. These results were supported by a recent study that evaluated the psychometric properties of the Doloplus-2, and two other
               tools for behavioural pain assessment, by comparing observer based pain scores from two independent raters [26]. This study found low congruent validity in the Doloplus-2, it questioned the validity of the psychosocial domain, and its
               clinical usefulness was evaluated as moderate by the participating nurses. The authors acknowledged that the study design
               was less adequate for exploring the psychometric properties of the Dololplus-2 compared to the other tools and they requested
               more studies on the validity and intra- and inter-reliability of the Doloplus-2 [26].

Based on the previous results and our experiences with the use of a pain expert as a criterion for pain, a new study was launched
               in order to further study the psychometric performance of the Doloplus-2. The objectives of the present study were to:

1. Assess the criterion validity of the Doloplus-2 in patients who are unable to self-report pain due to cognitive failure.

2. Test the inter-rater reliability of a pain expert's ratings (used as criterion).

3. Evaluate the inter-rater reliability of the Doloplus-2 by comparing the results from different and independent administrators.

Methods

Subjects

The subjects were a convenience sample of 73 consecutively recruited patients from two nursing homes (N = 51) and from the
                  Section of Geriatrics at St. Olav's University Hospital (N = 22) in Trondheim, Norway. As previous publications had demonstrated
                  pain to be prevalent in regular nursing homes and in geriatric hospital units [3,27], these were approached under the assumption that painful somatic conditions would be prevalent. The patients should be unable
                  to self-report pain due to cognitive impairment based upon the nurses' clinical evaluation of the patients. Pain was defined
                  as and limited to somatic pain, i.e. a symptom generally relieved by analgesics, and consequently excluding what the pain
                  expert interpreted as existential pain.

Baseline characteristics

Cognitive function was assessed by the Mini Mental State Examination (MMSE) [28,29] administered by either a ward nurse or a medical student. The MMSE rates the level of cognitive function on a scale from
                  0–30. Patients with scores from 30-21 are regarded as normal to mildly cognitively impaired, scores from 20-11 denote moderate
                  cognitive impairment, and patients scoring 10-0 are severely cognitively impaired [30]. The MMSE was performed within the same week as the main data collection. At one nursing home ward the MMSE was performed
                  within a month (N = 10). Due to the patients' stabile conditions this was regarded as appropriate. Ability to perform activities
                  of daily living (ADL) was evaluated by a nurse familiar with the patient, using the Barthel Index [31]. This tool describes the ability to perform ADL on a scale from 0–20. Barthel index scores from 20-15 indicate independence
                  to mildly disabled ADL function, 14-10 indicate moderate disability, while a score of 9-0 indicate that the patient is severely
                  to very severely disabled [32]. The Barthel Index was completed within a week of the Doloplus-2. The MMSE and Barthel Index measures were used to provide
                  a baseline characteristic of the patients' status. Information regarding patients' use of analgesics was not recorded. Because
                  our aim was to test if the Doloplus-2 could assess pain in those who experienced pain, it was not regarded necessary to know
                  if a low level of pain behaviours were caused by adequate treatment or lack of pain.

Criterion validity of the Doloplus-2

The Doloplus-2 [22,24] is composed of ten items distributed on three domains: somatic, psychomotor and psychosocial. The somatic domain has five
                  items, while the psychomotor and psychosocial domains have two and three items, respectively. Each item has four response
                  alternatives, and is scored 0 for normal behaviour, through to 3 for high levels of pain-related behaviour. Thus the total
                  Doloplus-2 score ranges from 0–30.

The Doloplus-2 was administered by trained enrolled nurses, or registered nurses who were familiar with the patient. The attending
                  daytime nurse completed the Doloplus-2 registration after consulting with the other personnel who had been involved with the
                  patient during the past 24 hour period. Pain in the Doloplus-2 was registered according to the instructions for Doloplus-2
                  and recorded once for each patient, usually between noon and 3 p.m. [22].

In line with psychiatric methods for observational assessment and diagnoses in cases where an objective measure is inaccessible
                  a clinical expert statement was used as the criterion for pain [33-35]. A pain specialist nurse (pain expert) from the National Centre of Expertise for Pain and Complex Disorders at St. Olav's
                  University Hospital of Trondheim made a single evaluation of each patient's pain level on an eleven point Numerical Rating
                  Scale (NRS-11) from zero (no pain) to ten (worst imaginable pain). Each patient was ascribed two pain intensity scores, one
                  for pain in movement and one for pain at rest. These scores were used as the pain criterion. The pain evaluation was performed
                  the same day as the Doloplus-2 assessment, usually between noon and 4 p.m. The expert's evaluation made use of information
                  from the medical record, reports from nurses and patients (if possible) about pain during the past 24 hours, and a clinical
                  examination. The clinical examination comprised observation of the patient during rest and activity, and examination of common
                  trigger points for pain. Both the expert's pain score and the nurses' Doloplus-2 scores were based upon the same time interval
                  and all assessors had access to information about the patient's medical condition during the past 24 hours. The expert was
                  blinded from the Doloplus-2 administrators' assessment, and vice versa.

As a validation of the evaluations performed by the pain expert, two geriatricians with expertise in pain presentation in
                  demented patients observed the pain expert while he evaluated 15 consecutive patients. Without discussing the patients with
                  the pain expert, the two geriatricians independently rated the patients' pain using NRS-11. Their ratings were later examined
                  for degree of association with the expert's ratings.

Inter-rater reliability

Inter-rater reliability of the Doloplus-2 was assessed in 16 patients consecutively included at the Section of Geriatrics
                  at St Olav's University Hospital. A geriatric specialist nurse (GN) and an enrolled nurse evaluated each patient at the same
                  day and blinded from each other. The GN assessed all patients, while a team of six different enrolled nurses made the second
                  assessment.

See Figure 1 for overview of the study procedure.

Figure 1

Study procedure. *Performed the same day, usually performed between noon – 3 p.m. **The MMSE and Barthel were performed within the same week
                        as the pain assessments except from ten MMSE that was performed within a month.

Analyses

Univariate regression analyses were performed in order to analyse how well the Doloplus-2 predicted the expert pain score
                  (R-squared), and to analyse the contributions of each of the ten items. Since the Doloplus-2 score maximizes pain by adding
                  the scores of all items, we chose to compare with the highest of the pain expert's scores. The pain-in-movement score was
                  higher than the pain-at-rest score in all patients and consequently used as the pain criterion.

Association between the expert's pain ratings and the two geriatricians' ratings and the inter-rater reliability of the Doloplus-2
                  were evaluated with intra-class correlation coefficients. All analyses were performed by the SPSS statistical software version
                  13.0 (SPSS Inc., Chicago, USA).

Ethics

The Regional Committee for Medical Research Ethics approved the study. As recommended by the committee, written informed consent
                  was not obtained from the patients due to their cognitive impairment. Instead, the patient's nearest relative was informed,
                  both in writing and orally, and asked to give consent. Eligible patients were informed orally and asked if they would participate
                  before the administration of the MMSE and the pain expert evaluation. Patients were not to be included if they or their relative
                  declined participation, but no one did.

The constructors of the Doloplus-2 have approved our use of the tool.

Results

Baseline characteristics

Seventy-three patients were approached and all were included. The mean age of the sample was 84 years (Table 1), and 74% were female. The median MMSE score was 10 (Table 1). Two subjects died before the MMSE assessment, and seven were not assessed as they moved to another nursing home before
                  the MMSE assessment. These patients were included in the pain analyses, but excluded from the MMSE calculations. The Barthel
                  Index scores had a median value of 9 (Table 1).

Table 1

Distribution frequencies of background variables

                                 Age (mean 84)

                                 Numbers (N = 73)

                                 69–79 years

                                 19 (26%)

                                 80–90 years

                                 37 (51%)

                                 > 90 years

                                 17 (23%)

                                 MMSE-Score (median 10)*

                                 Severely cognitively impaired (CI)

                                 0–10

                                 32 (50%)

                                 Moderately CI

                                 11–20

                                 23 (36%)

                                 Mildly CI to normal

                                 21–30

                                 9 (14%)

                                 Barthel Index-Score (median 9)

                                 Very severely to severely disabled

                                 0–9

                                 41 (56%)

                                 Moderately disabled

                                 10–14

                                 18 (25%)

                                 Mildly disabled to independent in ADL

                                 15–20

                                 14 (19%)

*9-missing

Validity of the Doloplus-2

The expert rated seven patients ≥ 4 for pain-in-movement (moderate-to-severe pain), 40 were rated 1–3, and 26 were rated as
                  without pain. In all patients, the pain-in-movement score was equal to or higher than the pain-at-rest score. The association
                  between the pain expert's ratings and the two geriatricians' ratings (N = 15) was estimated with an intra-class correlation
                  of 0.74 with a 95% confidence interval from 0.5 to 0.89.

The mean Doloplus-2 score was 7.47 (SD = 5.08) with a range from 0–22. Five patients received a Doloplus-2 score of zero.
                  Among these, three were also rated with no pain by the expert, while the other two received a score of zero at rest and two
                  in movement.

The regression analysis of the Doloplus-2 scores against the expert scores produced an R2 of 0.023, implying poor criterion validity of the Doloplus-2 in this data set (Figure 2).

Figure 2

The relationship between expert ratings and Doloplus-2. The scatter plot demonstrates the relationship between the expert's pain score (NRS-11) and the Doloplus-2 score (0–30)
                        in all 73 patients.

To explore the data more closely we analysed each study site separately. No significant results were obtained while looking
                  at the complete data from the three sites; however, association was found between the pain expert and the geriatric expert
                  nurse (GN) who administered the Doloplus-2 in 16 patients in the Section of Geriatrics, with an R2 of 0.54.

Univariate regression analyses of the different Doloplus-2 items (full sample) showed small but significant relationships
                  between the Doloplus-2 item for protective body postures at rest and the expert's pain-in-movement score (R2 = 0.12, p = 0.003) and for the Doloplus-2 item pain complaints and the expert's pain-at-rest score (R2 = 0.13, p = 0.002).

Inter-rater reliability

The intra-class correlation for inter-rater reliability of the Doloplus-2 administrators was 0.77, with a 95% confidence interval
                  of 0.47 – 0.92.

Discussion

Herr et al. (2004) called for extensive testing of the Doloplus-2 to provide sufficient details on which to base sound judgment of the
               tool, and a recent review questioned both the specificity of the Doloplus-2 and the nurses' competence for scoring and interpreting
               the results [17]. The present study failed to confirm a valid relationship between the expert's ratings of pain and the Doloplus-2 scores
               in a sample of 73 cognitively impaired patients, even though the inter-rater reliability of the Doloplus-2 seemed to be satisfactory.
               These results differ from those of our previous pilot validation study [24], in which acceptable criterion validity was demonstrated when comparing Doloplus-2 against expert ratings.

We acknowledge several limitations in the present study. The samples sizes were small as indicated by the confidence intervals
               for the inter-rater analyses and the majority of the subjects were female (74%). Use of analgesics was not recorded. Analgesic
               efficacy might fluctuate throughout the day and information on the use of analgesics could have provided valuable baseline
               information. However, since all patients were evaluated on the basis of the full 24-hour period any potential bias from analgesics
               should be equivalent in both the expert and in the Doloplus-2 assessments.

The use of a pain expert's rating as a pain criterion is disputable as it may be questioned whether this represents a valid
               criterion. In line with psychiatric methodology for cases where no obvious gold standard exists, we used an expert-evaluation
               of the patients as the pain criterion. We tested the expert's performance in a sub-sample (N = 15) and found satisfactory
               inter-rater reliability between the expert and the two geriatricians. The low end of the confidence interval for the inter-rater
               reliability indicates that despite the small sample size of 15 evaluations the agreement is satisfactory.

It is probably an advantage for an expert-rater to know the patients. In the pilot study, the physicians responsible for the
               patients' treatment acted as the expert [24]. It is possible that the lack of association between Doloplus-2 and the expert's rating in the present study may partly
               be due to the use of an external pain expert who was unfamiliar with the patients instead of one who was familiar with the
               patients and the staff. The expert evaluated the presence of pain at rest and in movement. The Doloplus-2 does not distinguish
               between rest and movement, but adds all scores together. We decided to use the higher obtained of the two expert scores. This
               was without exception the pain-in-movement score. We do not suggest that the Doloplus-2 is designed to measure only pain in
               movement, but we believe that the expert's pain-in-movement score is the best indicator of pain in these patients.

Five patients were rated with a Doloplus-2 score of zero, as opposed to 26 in the expert's ratings. In order to discuss the
               discrepancy between Doloplus-2 and expert score, the pain expert, the GN and the Doloplus-2 administrators at one nursing
               home were consulted. It was impossible to know whether the pain expert identified false negative pain cases or whether the
               Doloplus-2 identified false positives. A general conclusion was that Doloplus-2 assessment in many of these patients was perceived
               as difficult. In patients who had high Doloplus-2 scores and low expert scores, clinical examinations revealed that the patients'
               discomfort seemed frequently related to grief, depression, anxiety and/or agitation rather than to somatic pain. This might
               suggest that the Doloplus-2 identifies patients with pain who may not have somatic pain (i.e. false positives), on the other
               side we can not out rule that this is a result from the pain expert underrating pain. The Doloplus-2 administrators were instructed
               to give positive scores on items only if changes in behaviour were suspected to be pain-related. In practice however, they
               were not able to evaluate this. As a result, they may have given positive scores on behavioural changes probably related to
               other causes than pain. This illustrates some well-known difficulties in pain assessment among patients with Behavioural and
               Psychological Symptoms of Dementia (BPSD) who are not able to describe their problems thoroughly and who may also have atypical
               symptom presentation [17,36]. The expert performed a comprehensive evaluation of the patient, but his pain ratings focused on what he judged as somatic
               pain intensity. The Doloplus-2 approaches pain multidimensional and this difference can partly explain some of the disagreement
               between expert and Doloplus-2. A concern for the validity of the expert judgments could be the use of patient charts information
               to inform their judgments. Presumably, this would allow access to information about physical pathology. There is only a marginal
               correlation between physical pathology and self-report of pain in people able to self-report. Inferring pain from this information
               can be questionable. However, the pain expert has several years experience from work at the National Centre of Expertise for
               Pain and Complex Disorders at St. Olav's University Hospital of Trondheim. A majority of the patients coming to this clinic
               has pain that does not have an identifiable basis in physical pathology. In the study design we wanted to give the expert
               access to all available information to minimize the chances of underestimating pain. He evaluated the different sources of
               information towards each other and we are confident in that he did not underrate pain due to lack of information on physical
               pathology in the charts. Instead, it may strengthen the expert evaluation that the expert was informed about the patients'
               diagnoses of possible painful chronic conditions.

Analyses indicated that competence in geriatrics improved the validity of the Doloplus-2 assessment. The Doloplus-2 scores
               had higher correlations with the expert's pain ratings in a small sub-group in which the Doloplus-2 was administered by a
               specialist GN. This finding was in concordance with the pilot study, where the Doloplus-2 administrators had higher skills
               than the administrators in the present study, as all assessments were made jointly by an enrolled nurse/registered nurse in
               cooperation with a fully trained final-year medical student [24]. Thus, it may be hypothesized that valid Doloplus-2 administration and interpretation demand training in geriatrics and
               knowledge of pain presentation in cognitively impaired patients. Analyses of the sub-group with the GN resulted in a similar
               pattern of items contributing in explaining the expert's pain score to that found in the pilot study [24]. The items for complaints, disturbed sleep, functionality during washing/dressing, and facial expressions explained most
               of the expert score, while the three psychosocial items explained close to nothing. The Doloplus-2 was originally developed
               for pain assessment in children and the inclusion of the psychosocial items may come from this origin. Based on results from
               Zwakhalen et al. (2007) and our two studies we suggest that the psychosocial domain could be removed from the Doloplus-2.

Some of the patients could provide limited information about pain at the moment and this was demonstrated during the expert's
               clinical examination and during the morning sessions, while the nurses wash and dress the patients, which caused some patients
               to express pain complaints, which then again lead to positive expert pain score and positive score on the Doloplus-2 item
               about pain complaints. The subjects' self-report was consequently taken into account when it was available. Future studies
               could try a simple verbal rating scale for self-report of pain intensity in some patients and use this in a combination with
               other criterions.

Reports have shown that pain is frequent, under-recognised and under-treated in nursing homes. Therefore we approached patients
               at regular nursing home units and at a geriatric department in order to include patients with higher levels of pain than in
               the pilot study [24]. As expected the MMSE scores and the Barthel Index demonstrated that the study population was cognitively impaired and dependent
               on care. However, unexpectedly it turned out that the sample had lower average levels of pain, as rated by the experts than,
               the sample in the pilot study. Low levels of pain have surprised other researchers in the field [36]. Thus, the present study also failed to provide data about the performance of Doloplus-2 in patients with severe pain.

To validate a tool is a long process and solid conclusions regarding the validity of the Doloplus-2 cannot be reached on the
               basis of our two studies. Through our studies we have established some experience in the design of studies for such validations.
               Future studies should include some patients with known painful diagnoses like patients with post operative hip-fractures.
               It will also be most valuable to have more than one pain criterion to test for agreement, in those where self-report is invalid.
               Pain experts could be used to establish a criterion. The use of more than one expert, blinded or unblinded, in each patient
               will strengthen the study. Test treatment with analgesics in patients with suspected pain and use of other behavioural tools
               and a verbal rating scale for present pain intensity may be valuable amendments.

The lack of agreement between expert and Doloplus-2 might reflect a common challenge for pain measurement in cognitively impaired
               by the use of behavioural assessment tools. Other tools recommended for use in these patients Abbey Scale [18], PADE [19], PAINAD [20], and PACSLAC [21] have obvious similarities to the Doloplus-2. All tools cover facial expressions, abnormalities in body postures/movements
               like guarding sore areas, impaired movement and verbal expressions. These tools are constructed for administration by health
               care providers, but to our knowledge none of them claim any criteria with regard to the administrators' competence. All tools
               include domains that are not only affected by pain. The inclusion of BPSD increases the pain sensitivity in these tools, but
               the specificity decreases. The consequence may be that comprehensive training of administrators and high administration skills
               is needed. The brief Checklist of Nonverbal Pain Indicators (CNPI) [37] is another interesting behavioural pain assessment tool, as it covers those parts of the Doloplus-2 that performed most
               successfully in our studies, but it needs further validation [17]. The CNPI may be an alternative that should be thoroughly tested before finally judged.

Conclusion

Based on the results from our two studies combined, we recommend the use of more than one pain criterion. Pain experts can
               be used as one of these, especially in patients that have no or limited ability to self-report. A combination of pain experts,
               other behavioral pain assessment tools, a verbal rating scale for self-report of present pain intensity and test-treatment
               with analgesics could constitute a promising pain criterion in future studies. The present study does not support the criterion
               validity of the Doloplus-2 as a clinical pain assessment tool in its present version. The results indicate that there seems
               to be a need for systematic training of the administrators before the instrument can be of clinical use.

Competing interests

The author(s) declare that they have no competing interests.

Authors' contributions

JCH, IS, PMF and SK contributed to the design of this study. JCH and IS organized and performed the data-collection. JCH,
               PMF and JHL performed the statistical analysis. All authors participated in interpretation of the data, drafting the manuscript
               and all read and approved the final manuscript.

Pre-publication history

The pre-publication history for this paper can be accessed here:

http://www.biomedcentral.com/1471-2318/7/29/prepub

Acknowledgements

Acknowledgements

The authors wish to thank Bjørn Hval, RN, Department of Anaesthesiology, St. Olav's Hospital, Trondheim, Norway for his work
                  as the pain expert. We also wish to thank the patients and the staff of Trondheim Hospital and Ilsvika nursing homes, and
                  The Geriatric Ward at St. Olav's University Hospital for their enthusiastic participation, and Elin Einarson RN, Astri Huseby
                  MD, and Silje Songe-Møller medical student, for their invaluable contributions. This work was financed by The Research Council
                  of Norway.

References

1

                              Manfredi PL.

                           	,
                           Breuer B.

                           	,
                           Meier DE.

                           	,
                           Libow L.
                                 	 Pain assessment in elderly patients with severe dementia  J Pain Symptom Manage.
                           	  2003.
                           PMID:
                           	 12565188.
                           DOI:
                           	 10.1016/S0885-3924(02)00530-4.

2

                              Herr K.
                                 	 Pain assessment in cognitively impaired older adults  Am J Nurs.
                           	  2002.
                           PMID:
                           	 12473932.

3

                              Ferrell BA.

                           	,
                           Ferrell BR.

                           	,
                           Rivera L.
                                 	 Pain in cognitively impaired nursing home patients  J Pain Symptom Manage.
                           	  1995.
                           PMID:
                           	 8594119.
                           DOI:
                           	 10.1016/0885-3924(95)00121-2.

4

                              Matthews FE.

                           	,
                           Dening T.
                                 	 Prevalence of dementia in institutional care  Lancet.
                           	  2002.
                           PMID:
                           	 12133659.
                           DOI:
                           	 10.1016/S0140-6736(02)09461-8.

5

                              Hjermstad M.

                           	,
                           Loge JH.

                           	,
                           Kaasa S.
                                 	 Methods for assessment of cognitive failure and delirium in palliative care patients: implications for practice and research  Palliat Med.
                           	  2004.
                           PMID:
                           	 15453620.
                           DOI:
                           	 10.1191/0269216304pm920oa.

6

                              Turk DC.

                           	,
                           Melzack R.
                                 	  Handbook of pain assessment.
                           	  2001.
                           2ndLondon, Guilford Press

7

                              Cook AK.

                           	,
                           Niven CA.

                           	,
                           Downs MG.
                                 	 Assessing the pain of people with cognitive impairment  Int J Geriatr Psychiatry.
                           	  1999.
                           PMID:
                           	 10398350.
                           DOI:
                           	 10.1002/(SICI)1099-1166(199906)14:6<421::AID-GPS932>3.0.CO;2-Y.

8

                              Marquie L.

                           	,
                           Raufaste E.

                           	,
                           Lauque D.

                           	,
                           Marine C.

                           	,
                           Ecoiffier M.

                           	,
                           Sorum P.
                                 	 Pain rating by patients and physicians: evidence of systematic pain miscalibration  Pain.
                           	  2003.
                           PMID:
                           	 12670671.
                           DOI:
                           	 10.1016/S0304-3959(02)00402-5.

9

                              Shannon MM.

                           	,
                           Ryan MA.

                           	,
                           D'Agostino N.

                           	,
                           Brescia FJ.
                                 	 Assessment of pain in advanced cancer patients  J Pain Symptom Manage.
                           	  1995.
                           PMID:
                           	 7602178.
                           DOI:
                           	 10.1016/0885-3924(95)00003-H.

10

                              Stolee P.

                           	,
                           Hillier LM.

                           	,
                           Esbaugh J.

                           	,
                           Bol N.

                           	,
                           McKellar L.

                           	,
                           Gauthier N.
                                 	 Instruments for the assessment of pain in older persons with cognitive impairment  J Am Geriatr Soc.
                           	  2005.
                           PMID:
                           	 15673359.
                           DOI:
                           	 10.1111/j.1532-5415.2005.53121.x.

11

                              Horgas AL.

                           	,
                           Tsai PF.
                                 	 Analgesic drug prescription and use in cognitively impaired nursing home residents  Nurs Res.
                           	  1998.
                           PMID:
                           	 9683119.
                           DOI:
                           	 10.1097/00006199-199807000-00009.

12

                              Scherder E.

                           	,
                           Oosterman J.

                           	,
                           Swaab D.

                           	,
                           Herr K.

                           	,
                           Ooms M.

                           	,
                           Ribbe M.

                           	,
                           Sergeant J.

                           	,
                           Pickering G.

                           	,
                           Benedetti F.
                                 	 Recent developments in pain in dementia  BMJ.
                           	  2005.
                           PMID:
                           	 15731144.
                           DOI:
                           	 10.1136/bmj.330.7489.461.

13

                              Jensen MP.

                           	,
                           Karoly P.
                                 	 Turk DC and Melzack R Self-Report Scales and Procedures for Assessing Pain in Adults  Handbook of Pain Assessment.
                           	  2001.
                           2ndLondon, Guilford Press

14

                              Hadjistavropoulos T.

                           	,
                           Craig KD.
                                 	 A theoretical framework for understanding self-report and observational measures of pain: a communications model  Behaviour Research and Therapy.
                           	  2002.
                           PMID:
                           	 12038648.
                           DOI:
                           	 10.1016/S0005-7967(01)00072-9.

15

                              Herr K.

                           	,
                           Decker S.

                           	,
                           Bjoro K.
                                 	  State of the Art Review of Tools for Assessment of Pain in Nonverbal Older Adults.
                           	  2005.
                           The University of Iowahttp://www.cityofhope.org/prc/Review%20of%20Tools%20for%20Pain%20Assessment/Review%20of%20Tools%202004/General%20Information/Project%20Overview.pdf

16

                              Rodriguez CS.
                                 	 Pain measurement in the elderly: a review  Pain Manag Nurs.
                           	  2001.
                           PMID:
                           	 11706769.
                           DOI:
                           	 10.1053/jpmn.2001.23746.

17

                              Zwakhalen SM.

                           	,
                           Hamers JP.

                           	,
                           Huijer Abu-Saad H.

                           	,
                           Berger MP.
                                 	 Pain in elderly people with severe dementia: A systematic review of behavioural pain assessment tools  BMC Geriatr.
                           	  2006.
                           PMID:
                           	 16441889.
                           DOI:
                           	 10.1186/1471-2318-6-3.

18

                              Abbey J.

                           	,
                           Piller N.

                           	,
                           De BA.

                           	,
                           Esterman A.

                           	,
                           Parker D.

                           	,
                           Giles L.

                           	,
                           Lowcay B.
                                 	 The Abbey pain scale: a 1-minute numerical indicator for people with end-stage dementia  Int J Palliat Nurs.
                           	  2004.
                           PMID:
                           	 14966439.

19

                              Villanueva MR.

                           	,
                           Smith TL.

                           	,
                           Erickson JS.

                           	,
                           Lee AC.

                           	,
                           Singer CM.
                                 	 Pain Assessment for the Dementing Elderly (PADE): reliability and validity of a new measure  J Am Med Dir Assoc.
                           	  2003.
                           PMID:
                           	 12807590.

20

                              Warden V.

                           	,
                           Hurley AC.

                           	,
                           Volicer L.
                                 	 Development and psychometric evaluation of the Pain Assessment in Advanced Dementia (PAINAD) scale  J Am Med Dir Assoc.
                           	  2003.
                           PMID:
                           	 12807591.

21

                              Fuchs-Lacelle S.

                           	,
                           Hadjistavropoulos T.
                                 	 Development and preliminary validation of the pain assessment checklist for seniors with limited ability to communicate (PACSLAC)  Pain Manag Nurs.
                           	  2004.
                           PMID:
                           	 14999652.
                           DOI:
                           	 10.1016/j.pmn.2003.10.001.

22

                              Lefebvre-Chapiro S.
                                 	 The DOLOPLUS 2 scale - evaluating pain in the elderly  European Journal Of Palliative Care.
                           	  2001.

23

                              Doloplus C.
                                 	 The Doloplus web-site  2006.
                           http://www.doloplus.com/versiongb/index.htm

24

                              Hølen JC.

                           	,
                           Saltvedt I.

                           	,
                           Fayers PM.

                           	,
                           Bjornnes M.

                           	,
                           Stenseth G.

                           	,
                           Hval B.

                           	,
                           Filbet M.

                           	,
                           Loge JH.

                           	,
                           Kaasa S.
                                 	 The Norwegian doloplus-2, a tool for behavioural pain assessment: translation and pilot-validation in nursing home patients
                              with cognitive impairment  Palliat Med.
                           	  2005.
                           PMID:
                           	 16111065.
                           DOI:
                           	 10.1191/0269216305pm1031oa.

25

                              Herr K.

                           	,
                           Decker S.

                           	,
                           Bjoro K.
                                 	 Doloplus-2  2004.
                           http://www.cityofhope.org/prc/Review%20of%20Tools%20for%20Pain%20Assessment/Doloplus%20Text.htm

26

                              Zwakhalen SM.

                           	,
                           Hamers JP.

                           	,
                           Berger MP.
                                 	 The psychometric quality and clinical usefulness of three pain assessment tools for elderly people with dementia  Pain.
                           	  2006.
                           PMID:
                           	 16890355.
                           DOI:
                           	 10.1016/j.pain.2006.06.029.

27

                              Cowan DT.

                           	,
                           Fitzpatrick JM.

                           	,
                           Roberts JD.

                           	,
                           While AE.

                           	,
                           Baldwin J.
                                 	 The assessment and management of pain among older people in care homes: current status and future directions  Int J Nurs Stud.
                           	  2003.
                           PMID:
                           	 12605951.
                           DOI:
                           	 10.1016/S0020-7489(02)00087-1.

28

                              Folstein MF.

                           	,
                           Folstein SE.

                           	,
                           McHugh PR.
                                 	 Mini-Mental State: a practical method for grading the cognitive state of patients for the clinician  Journal of Psychiatric Research.
                           	  1975.
                           PMID:
                           	 1202204.
                           DOI:
                           	 10.1016/0022-3956(75)90026-6.

29

                              Folstein MF.

                           	,
                           Fetting JH.

                           	,
                           Lobo A.

                           	,
                           Niaz U.

                           	,
                           Capozzoli KD.
                                 	 Cognitive assessment of cancer patients  Cancer.
                           	  1984.
                           PMID:
                           	 6704913.

30

                              Perneczky R.

                           	,
                           Wagenpfeil S.

                           	,
                           Komossa K.

                           	,
                           Grimmer T.

                           	,
                           Diehl J.

                           	,
                           Kurz A.
                                 	 Mapping scores onto stages: mini-mental state examination and clinical dementia rating  Am J Geriatr Psychiatry.
                           	  2006.
                           PMID:
                           	 16473978.
                           DOI:
                           	 10.1097/01.JGP.0000192478.82189.a8.

31

                              Mahoney FI.

                           	,
                           Barthel DW.
                                 	 Functional evaluation: The Barthel Index  Md State Med J.
                           	  1965.
                           PMID:
                           	 14258950.

32

                              Wade DT.

                           	,
                           Hewer RL.
                                 	 Functional abilities after stroke: measurement, natural history and prognosis  J Neurol Neurosurg Psychiatry.
                           	  1987.
                           PMID:
                           	 3572432.

33

                              Kim SY.

                           	,
                           Caine ED.

                           	,
                           Currier GW.

                           	,
                           Leibovici A.

                           	,
                           Ryan JM.
                                 	 Assessing the competence of persons with Alzheimer's disease in providing informed consent for participation in research  Am J Psychiatry.
                           	  2001.
                           PMID:
                           	 11329391.
                           DOI:
                           	 10.1176/appi.ajp.158.5.712.

34

                              Nicholson RA.
                                 	 Validation of a brief form of the Competency Screening Test  J Clin Psychol.
                           	  1988.
                           PMID:
                           	 3343371.

35

                              Sheehan DV.

                           	,
                           Lecrubier Y.

                           	,
                           Sheehan KH.

                           	,
                           Amorim P.

                           	,
                           Janavs J.

                           	,
                           Weiller E.

                           	,
                           Hergueta T.

                           	,
                           Baker R.

                           	,
                           Dunbar GC.
                                 	 The Mini-International Neuropsychiatric Interview (M.I.N.I.): the development and validation of a structured diagnostic psychiatric
                              interview for DSM-IV and ICD-10  J Clin Psychiatry.
                           	  1998.
                           PMID:
                           	 9881538.

36

                              Leong IY.

                           	,
                           Chong MS.

                           	,
                           Gibson SJ.
                                 	 The use of a self-reported pain measure, a nurse-reported pain measure and the PAINAD in nursing home residents with moderate
                              and severe dementia: a validation study  Age Ageing.
                           	  2006.
                           PMID:
                           	 16497681.
                           DOI:
                           	 10.1093/ageing/afj058.

37

                              Feldt KS.
                                 	 The checklist of nonverbal pain indicators (CNPI)  Pain Manag Nurs.
                           	  2000.
                           PMID:
                           	 11706452.
                           DOI:
                           	 10.1053/jpmn.2000.5831.

Article Information (continued)

Categories:

Subject: Research Article

This display is generated from NISO JATS XML with jats-html.xsl. The XSLT engine is SAXON 9.2.0.6 from Saxonica.


text:
package nkp.pspValidator.shared.externalUtils;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

/**
 * Created by Martin Řehánek on 29.9.16.
 */
public class CliCommand {

    private final String[] command;

    public CliCommand(String[] command) {
        this.command = command;
    }

    public Result execute() throws CliCommandException {
        try {
            //System.out.println("command: " + this);
            Process process = Runtime.getRuntime().exec(command);
            //TODO: perhaps thread pooling here

            //read standard error stream in separate thread
            StringBuilder stderrBuilder = new StringBuilder();
            Thread errThread = new Thread(() -> {
                try {
                    BufferedReader stderrReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
                    String line;
                    while ((line = stderrReader.readLine()) != null) {
                        stderrBuilder.append(line);
                        stderrBuilder.append('\n');
                    }
                    stderrReader.close();
                } catch (IOException e) {
                    //e.printStackTrace();
                    //nothing, only main thread running program itself shoud propagate exception
                }
            });

            //read standard output stream in separate thread
            StringBuilder stdoutBuilder = new StringBuilder();
            Thread outThread = new Thread(() -> {
                try {
                    BufferedReader stdoutReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
                    String line;
                    while ((line = stdoutReader.readLine()) != null) {
                        stdoutBuilder.append(line);
                        stdoutBuilder.append('\n');
                        //System.err.println(line);
                    }
                    stdoutReader.close();
                } catch (IOException e) {
                    //e.printStackTrace();
                    //nothing, only main thread running program itself shoud propagate exception
                }
            });
            //start threads to read output streams
            outThread.start();
            errThread.start();

            //wait for all 3 threads to finish
            int exitValue = process.waitFor();
            outThread.join();
            errThread.join();
            String stdOut = stdoutBuilder.toString();
            String stdErr = stderrBuilder.toString();
            /*System.err.println("SOUT: " + stdOut);
            System.err.println("SERR: " + stdErr);*/
            Result result = new Result(exitValue, stdOut, stdErr);
            //result.print();
            return result;
        } catch (Throwable e) {
            //e.printStackTrace();
            //throw e;
            //return null;
            //return new Result(-1,null, e.getMessage());
            throw new CliCommandException(e.getMessage());
        }
    }

    @Override
    public String toString() {
        return "CliCommand{" +
                "command=" + Arrays.toString(command) +
                '}';
    }

    public static class Result {
        private final int exitValue;
        private final String stdout;
        private final String stderr;

        public Result(int exitValue, String stdout, String stderr) {
            this.exitValue = exitValue;
            this.stdout = stdout;
            this.stderr = stderr;
        }

        public String getStdout() {
            return stdout;
        }

        public String getStderr() {
            return stderr;
        }

        public int getExitValue() {
            return exitValue;
        }

        public void print() {
            System.out.println("EXIT VALUE: " + exitValue + (exitValue == 0 ? " (ok)" : " (error)"));
            System.out.println("SERR: " + stderr);
            System.out.println("SOUT: " + stdout);
        }
    }

    public static class CliCommandException extends Exception {
        public CliCommandException(String message) {
            super(message);
        }

        public CliCommandException(String message, Throwable cause) {
            super(message, cause);
        }
    }

}


text:
#ifndef _LDCONFIG_H
#define _LDCONFIG_H

#define FLAG_ANY		-1
#define FLAG_TYPE_MASK		0x00ff
#define FLAG_LIBC4		0x0000
#define FLAG_ELF		0x0001
#define FLAG_ELF_LIBC5		0x0002
#define FLAG_ELF_LIBC6		0x0003
#define FLAG_REQUIRED_MASK	0xff00
#define FLAG_SPARC_LIB64	0x0100
#define FLAG_IA64_LIB64		0x0200
#define FLAG_X8664_LIB64	0x0300
#define FLAG_S390_LIB64		0x0400
#define FLAG_POWERPC_LIB64	0x0500
#define FLAG_MIPS64_LIBN32	0x0600
#define FLAG_MIPS64_LIBN64	0x0700

/* Name of auxiliary cache.  */
#define _PATH_LDCONFIG_AUX_CACHE "/var/cache/ldconfig/aux-cache"

/* Declared in cache.c.  */
extern void print_cache (const char *cache_name);

extern void init_cache (void);

extern void save_cache (const char *cache_name);

extern void add_to_cache (const char *path, const char *lib, int flags,
			  unsigned int osversion, uint64_t hwcap);

extern void init_aux_cache (void);

extern void load_aux_cache (const char *aux_cache_name);

extern int search_aux_cache (struct stat64 *stat_buf, int *flags,
			     unsigned int *osversion, char **soname);

extern void add_to_aux_cache (struct stat64 *stat_buf, int flags,
			      unsigned int osversion, const char *soname);

extern void save_aux_cache (const char *aux_cache_name);

/* Declared in readlib.c.  */
extern int process_file (const char *real_file_name, const char *file_name,
			 const char *lib, int *flag, unsigned int *osversion,
			 char **soname, int is_link, struct stat64 *stat_buf);

extern char *implicit_soname (const char *lib, int flag);

/* Declared in readelflib.c.  */
extern int process_elf_file (const char *file_name, const char *lib, int *flag,
			     unsigned int *osversion, char **soname,
			     void *file_contents, size_t file_length);

/* Declared in chroot_canon.c.  */
extern char *chroot_canon (const char *chroot, const char *name);

/* Declared in ldconfig.c.  */
extern int opt_verbose;

extern int opt_format;

/* Prototypes for a few program-wide used functions.  */
extern void *xmalloc (size_t __n);
extern void *xcalloc (size_t __n, size_t __size);
extern void *xrealloc (void *__p, size_t __n);
extern char *xstrdup (const char *__str);

#endif /* ! _LDCONFIG_H  */


text:
//
//  NKNewFeatureCollectionViewController.m
//  01-彩票
//
//  Created by J on 15/9/23.
//  Copyright (c) 2015年 jay. All rights reserved.
//

#import "NKNewFeatureCollectionViewController.h"
#import "NKCollectionViewCell.h"
#import "UIView+Frame.h"

@interface NKNewFeatureCollectionViewController ()

/** 图片*/
@property (nonatomic,weak)UIImageView *guide;

/** 大文字*/
@property (nonatomic,weak)UIImageView *guideLargeText;

/** 小文字*/
@property (nonatomic,weak)UIImageView *guideSmallText;

/** 上一次X的偏移量*/
@property (nonatomic,assign) CGFloat lastOffsetX;

@end

@implementation NKNewFeatureCollectionViewController

//重写init方法
- (instancetype)init
{
    //流水布局
    UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];

    //尺寸
    layout.itemSize = [UIScreen mainScreen].bounds.size;

    //cell间距
    layout.minimumInteritemSpacing = 0;

    //行间距
    layout.minimumLineSpacing = 0;

    //滑动的方向,水平
    layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;

    //添加到流水布局中
    return [self initWithCollectionViewLayout:layout];

}

NSString *ID = @"cell";

- (void)viewDidLoad {

    [super viewDidLoad];

    [self setUPCollectionView];

    [self setUPAllChildView];

    _lastOffsetX = 0;

}

//初始化collectionView
- (void)setUPCollectionView
{

    //注册cell
    [self.collectionView registerClass:[NKCollectionViewCell class] forCellWithReuseIdentifier:ID];

    //取消弹簧效果
    self.collectionView.bounces = NO;

    //取消水平指示器
    self.collectionView.showsHorizontalScrollIndicator = NO;

    //开启分页模式
    self.collectionView.pagingEnabled = YES;
}

//添加collectionView子控件
- (void)setUPAllChildView
{

    //图片
    UIImageView *guide = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"guide1"]];
    _guide = guide;
    guide.centerX = self.collectionView.centerX;
    [self.collectionView addSubview:guide];

    //大文字
    UIImageView *guideLargeText = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"guideLargeText1"]];
    _guideLargeText = guideLargeText;
    guideLargeText.centerX = self.collectionView.centerX;
    guideLargeText.centerY = self.collectionView.bounds.size.height * 0.75;
    [self.collectionView addSubview:guideLargeText];

    //小文字
    UIImageView *guideSmallText = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"guideSmallText1"]];
    _guideSmallText = guideSmallText;
    guideSmallText.centerX = self.collectionView.centerX;
    guideSmallText.centerY = self.collectionView.bounds.size.height * 0.83;
    [self.collectionView addSubview:guideSmallText];

    //线段
    UIImageView *guideLine = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"guideLine"]];
    guideLine.centerX -= 175;
    [self.collectionView addSubview:guideLine];

}

//滚动的结束时候调用
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    //当前的偏移量
    CGFloat curOffsetX = scrollView.contentOffset.x;
    //页数
    NSInteger index = curOffsetX / self.collectionView.bounds.size.width;

    //当前页数所对应的图片
    NSString *guideName = [NSString stringWithFormat:@"guide%ld",index + 1];
    NSString *guideLargeTextName = [NSString stringWithFormat:@"guideLargeText%ld",index + 1];
    NSString *guideSmallTextName = [NSString stringWithFormat:@"guideSmallText%ld",index + 1];
    _guide.image = [UIImage imageNamed:guideName];
    _guideLargeText.image = [UIImage imageNamed:guideLargeTextName];
    _guideSmallText.image = [UIImage imageNamed:guideSmallTextName];

    //偏移量的差值
    CGFloat delta = curOffsetX - _lastOffsetX;

    //先平移两个屏幕宽
    _guide.centerX += 2 * delta;
    _guideLargeText.centerX += 2 * delta;
    _guideSmallText.centerX += 2 * delta;

    [UIView animateWithDuration:0.25 animations:^{

        //后退一个屏幕宽
        _guide.centerX -= delta;
        _guideLargeText.centerX -= delta;
        _guideSmallText.centerX -= delta;

    }];

    //记录上一次的偏移量
    _lastOffsetX = curOffsetX;

}

#pragma mark - UICollectionView数据源
//返回有多少个cell
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return 4;
}

//Cell的内容
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    //从缓存中取得Cell
    NKCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];

    NSString *imageName = [NSString stringWithFormat:@"guide%ldBackground",indexPath.item + 1];

    cell.image = [UIImage imageNamed:imageName];

    [cell hideButton:indexPath pageNumber:4];

    return cell;
}

@end


text:
header {
  background-image: url("../assets/dev-space01.jpeg");
  height: 100vh;
  background-size: cover;
  background-position: center center;
  margin-bottom: 30px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  color: white;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
  header h1 {
    margin-top: 0;
    padding-top: 10px;
    font-family: "Marvel", sans-serif;
    font-size: 3em; }
  header img {
    width: 98px;
    height: 98px; }
  header h4 {
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
    font-family: "Raleway", sans-serif;
    font-size: 1em; }
  header nav {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: space-around;
        -ms-flex-pack: distribute;
            justify-content: space-around;
    width: 95%;
    padding-bottom: 20px; }
    header nav .nav-item {
      margin: 5px;
      border: 2px solid white;
      text-align: center;
      font-size: 1em;
      font-family: "Oswald", sans-serif;
      width: 25%; }
      header nav .nav-item a, header nav .nav-item a:visited {
        text-decoration: none;
        color: white; }

h1, h2 {
  font-family: "Marvel", sans-serif; }

hr {
  color: #ddd;
  width: 85%; }

section {
  width: 90%;
  margin: 20px auto;
  text-align: center;
  color: #333; }
  section a, section a:hover, section a:visited, section a:active {
    text-decoration: none;
    color: inherit; }
  section p {
    font-family: "Raleway", sans-serif;
    text-align: justify; }
    section p a {
      text-decoration: underline; }
  section h2 {
    text-align: center; }

.about img {
  width: 100px;
  height: 100px; }

.skills .skill-images {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-justify-content: space-around;
      -ms-flex-pack: distribute;
          justify-content: space-around;
  width: 80%;
  margin: 0 auto; }
  .skills .skill-images img {
    width: 48px;
    height: 48px;
    margin: 0px 5px 15px; }
.skills .skill-info {
  margin: 0 auto;
  width: 85%;
  height: 30vh;
  background: #ddd; }

footer {
  font-family: "Marvel", sans-serif;
  color: white;
  width: 100%;
  text-align: center;
  background: #333;
  margin-bottom: 0px;
  height: 50px; }
  footer p {
    vertical-align: middle;
    line-height: 50px;
    margin: 0px;
    font-size: 0.9em; }
    footer p a, footer p a:hover, footer p a:visited, footer p a:active {
      text-decoration: underline;
      color: white; }


text:
namespace Humanizer
{

///
/// Transform a number into words; e.g. 1 => one
///
class NumberToWordsExtension
{
    typedef System::Globalization::CultureInfo CultureInfo;
    typedef Humanizer::Configuration::Configurator Configurator;

public:
    ///
    /// 3501.ToWords() -> "three thousand five hundred and one"
    ///
    /// <param name="number">Number to be turned to words</param>
    /// <param name="culture">Culture to use. If nullptr, current thread's UI culture is used.</param>
    /// <returns></returns>
    static std::string ToWords( int number, const CultureInfo * culture = nullptr )
    {
        return Configurator::GetNumberToWordsConverter( culture ).Convert( number );
    }

    ///
    /// For locales that support gender-specific forms
    ///
    /// <example>
    /// Russian:
    ///
    ///   1.ToWords(GrammaticalGender.Masculine) -> "один"
    ///   1.ToWords(GrammaticalGender.Feminine) -> "одна"
    ///
    /// Hebrew:
    ///
    ///   1.ToWords(GrammaticalGender.Masculine) -> "אחד"
    ///   1.ToWords(GrammaticalGender.Feminine) -> "אחת"
    ///
    /// </example>
    ///
    /// <param name="number">Number to be turned to words</param>
    /// <param name="gender">The grammatical gender to use for output words</param>
    /// <param name="culture">Culture to use. If nullptr, current thread's UI culture is used.</param>
    /// <returns></returns>
    static std::string ToWords( int number, GrammaticalGender gender, const CultureInfo * culture = nullptr )
    {
        return Configurator::GetNumberToWordsConverter( culture ).Convert( number, gender );
    }

    ///
    /// 1.ToOrdinalWords() -> "first"
    ///
    /// <param name="number">Number to be turned to ordinal words</param>
    /// <param name="culture">Culture to use. If nullptr, current thread's UI culture is used.</param>
    /// <returns></returns>
    static std::string ToOrdinalWords( int number, const CultureInfo * culture = nullptr )
    {
        return Configurator::GetNumberToWordsConverter( culture ).ConvertToOrdinal( number );
    }

    ///
    /// for Brazilian Portuguese locale
    /// 1.ToOrdinalWords(GrammaticalGender.Masculine) -> "primeiro"
    /// 1.ToOrdinalWords(GrammaticalGender.Feminine) -> "primeira"
    ///
    /// <param name="number">Number to be turned to words</param>
    /// <param name="gender">The grammatical gender to use for output words</param>
    /// <param name="culture">Culture to use. If nullptr, current thread's UI culture is used.</param>
    /// <returns></returns>
    static std::string ToOrdinalWords( int number, GrammaticalGender gender, const CultureInfo * culture = nullptr )
    {
        return Configurator::GetNumberToWordsConverter( culture ).ConvertToOrdinal( number, gender );
    }
};
}

#endif // _NumberToWordsExtension_h_