From e1679f1044b94d9ec2a9d3b67c8e12581e2f313c Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 21 Oct 2021 14:00:31 -0700 Subject: get tests to start passing --- grobid_tei_xml/__init__.py | 0 grobid_tei_xml/grobid2json.py | 2 +- tests/files/example_grobid.tei.xml | 476 +++++++++++++++++++++++++++++++++++++ tests/files/small.json | 65 +++++ tests/test_grobid2json.py | 30 ++- 5 files changed, 571 insertions(+), 2 deletions(-) create mode 100644 grobid_tei_xml/__init__.py create mode 100644 tests/files/example_grobid.tei.xml create mode 100644 tests/files/small.json diff --git a/grobid_tei_xml/__init__.py b/grobid_tei_xml/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/grobid_tei_xml/grobid2json.py b/grobid_tei_xml/grobid2json.py index 5c44953..ac0710c 100755 --- a/grobid_tei_xml/grobid2json.py +++ b/grobid_tei_xml/grobid2json.py @@ -45,7 +45,7 @@ def all_authors(elem: Optional[ET.Element], ns: str = ns) -> List[Dict[str, Any] continue given_name = pn.findtext("./{%s}forename" % ns) or None surname = pn.findtext("./{%s}surname" % ns) or None - full_name = " ".join(pn.itertext()) + full_name = " ".join([t.strip() for t in pn.itertext() if t.strip()]).strip() obj: Dict[str, Any] = dict(name=full_name) if given_name: obj["given_name"] = given_name diff --git a/tests/files/example_grobid.tei.xml b/tests/files/example_grobid.tei.xml new file mode 100644 index 0000000..5726877 --- /dev/null +++ b/tests/files/example_grobid.tei.xml @@ -0,0 +1,476 @@ + + + + + + + GROBID - A machine learning software for extracting information from scholarly documents + + + + + + Changes of patients' satisfaction with the health care services in Lithuanian Health Promoting Hospitals network + + + + + 2003 + + + + + + IrenaMisevičienė + + + ŽemynaMilašauskienė + + + + Institute for Biomedical Research + Institute for Biomedical Research + Kaunas University of Medicine +
+ Lithuania +
+
+
+ + + Kaunas University of Medicine +
+ Eiveni ų 4 + 3007 + Kaunas + Lithuania +
+
+
+ Changes of patients' satisfaction with the health care services in Lithuanian Health Promoting Hospitals network +
+ + MEDICINA + + 39 + 2003 + + + 604 Correspondence to Ž. Milašauskienė, +
+
+
+ + +

Key words: health care, quality of health care services, patient satisfaction, physical environment, behavior of nurses and physicians. Summary. The aim of this study is to evaluate the changes of patients' satisfaction with health care services in Lithuanian Health Promoting Hospitals network. In a survey, which was carried out by Lithuanian Health Promoting Hospitals network, 1271 patients took part in 2000 and 1467 patients in 2002. The patient's satisfaction with health care services was evaluated using a uniform anonymous questionnaire. The patients were asked to evaluate hospital environment (neatness, cleanliness, and food quality), the quality of health personnel work (attentiveness, care, risk factors, and tests used for diagnosis and treatment) rating from 1 (very bad) to 6 (excellent). It was ascertained that, during the period between both surveys, the number of patients who evaluated the sanitary conditions in the ward as excellent and very good, increased from 49.2% to 59.9%, p<0.05. According to the data received from both surveys, the hospital food quality was rated more critically than the hospital environment. The number of patients, who noted that the food quality was satisfactory, decreased from 29.8% to 22.0%, p<0.05 within the period analyzed. However the number of patients who had a positive opinion of the health care personnel's attentiveness and help while explaining the causes and consequences of various illnesses increased. Patients' assessment of the physician work remained the same. The majority of the patients (95.1% in 2000 and 94.9% in 2002) appreciated the overall performance of the physicians, and rated it very good and excellent. The analysis of patients' satisfaction is a simple study of a constituent part of the health care service quality assessment and an objective prerequisite for the improvement of the quality of the health care services.

+
+
+
+ + +
Changes of patients' satisfaction with the health care services in Lithuanian Health Promoting Hospitals network

The increasing competition and the wish to hold out in the market conditions encourages the health care institutions to change their approach to the users of health care services and to search for new methods of creating an organized system that would be able to quickly adapt to the needs of a patient (1)(2)(3)(4). The research done in Western European countries has shown that an effective and fast response to the patients' complaints ensures that most of them will come back to the same health care institution if needed (5,6). Patient satisfaction with health care services can be rated either according to the number of received complaints or by carrying out various patients' satisfaction surveys (6). Although reducing the incidence of complaints is a good indicator of the quality of health care institution activity, it would be misleading to rely on this indicator alone. Only a small part of dissatisfied patients are moved to make a formal complaint. The majority of dissatisfied patients tend to avoid using the same health care institution again (5,6). Usually each dissatisfied patient tries to inform other clients about the unsatisfactory services provided by health care institution and they will tend to choose another service if they can. Although currently Lithuanian health care institutions perform the monitoring in pursue of gathering information on patients' expectations and their needs (7), still they do it not systematically, using nonstandardized uniform questionnaires. That is why the gathered data usually serves only for internal auditing. The results of the surveys cannot be compared with the results from the other Lithuanian health care institutions. In 2000 Lithuanian Health Promoting Hospitals (HPH) network, started the evaluation of patients' satisfaction with the quality of the services provided by these hospitals (8). Using uniform questionnaire the patients treated in the Lithuanian HPH network hospitals, were examined in 2000 and 2002.

The aim of this study is to evaluate the changes of patients' satisfaction with health care services in Lithuanian HPH network.

+
Material and methods

Eight Lithuanian HPH network hospitals (Kaunas University of Medicine, Kaunas Clinical Infectious, Kaunas 3 rd Clinical, Vilkaviškis, Kretinga, Prienai hospitals, Palanga Rehabilitation Hospital and Tauragė District Hospital) took part in the survey carried out in 2000 and 2002. Hospitals, according to the number of beds, were divided into small ones (>100-300 beds), medium ones (300-700 beds) and big ones (>1000 beds). The sample size in each hospital was calculated according to the number of beds; following specialized statistical tables (5% error allowed) used for sociological research, while calculating representative samples. The studies in 2000 and 2002 were fulfilled in accordance with the same methodology. The patients of each hospital filled in the questionnaire in a day. Different departments of hospitals were chosen for the research. The questionnaire was distributed to patients who were treated in different departments of hospitals (internal diseases, cardiology, neurology, endocrinology, surgery, obstetrics, gynecology and pediatrics), except the intensive therapy and psychiatry departments. The nursing administrators distributed the questionnaires in all departments of the hospitals and collected them after the patients had filled them in. The questionnaires were not distributed to the patients who were hospitalized on that day. Out of 1300 questionnaires, 1271 were filled in and returned in 2000 (the response rate -97.8%). Out of 1500 questionnaires, 1419 were filled in and returned in 2002 (the response rate -94.6%). Patients, who had examinations or surgical operations on that day, did not participate in the survey. Only a minor part of the patients refused to fill in the form (0.9% and 1.3% in 2000 and 2002 respectively).

The patients were introduced with standard questionnaires comprised of 36 questions. The first part of the questionnaire consisted of general questions (age, occupation, time of treatment in this hospital, duration of stay in hospital, hospitalized urgently or by plan). The second part of the questionnaire was related to physical environment of hospital (neatness, cleanliness, and food quality) and the third part was evaluation of the health personnel's work quality (attentiveness, care, informing about health care services, causes of the disease, and tests used for diagnosis and treatment).

Considering the fact that hospitals make efforts to create better conditions for patients during their hospitalization, a few additional questions were included in the second part of the questionnaire given in 2002. The extra questions were as follows: was the patient able to make phone calls, take shower or bath; were the established visiting hours acceptable; were there enough visual aids to help orientated oneself in the hospital; were there any problems with the non-medical staff during the patients' hospitalization.

The patients were asked to choose one of the six best-suited answers to evaluate work and activities of health personnel: very bad, bad, satisfactory, good, very good, and excellent. The received data was codified. The estimation very bad was codified as 1, bad -2, satisfactory -3, good -4, very good -5, and excellent -6. While performing the analysis of the data, the estimations very bad, bad, and satisfactory were summed up and considered as negative evaluation of the work and activities of health personnel, while the estimations good, very good, and excellent were summed up and considered as positive evaluation.

While performing a statistical analysis of the data, the means of sample indications (x) and standard deviation (sd) were calculated. A Student test (t) was used for comparing the means; a chi square criterion was used for comparing non-parametrical values. The analysis of the data was performed using a statistical SPSS program.

+
Results and discussion

The distribution of patients according to sex and age did not differ between the first and second surveys. More women than men took part in both questionings. In the first survey participated 65.1% (n=827) of women and 34.9% (n=444) of men, in the second -61.3% (n=764) of women and 38.7% (n=501) of men p<0.05.

According to the data of the first survey, more than a half of the patients (62.5% of men and 57.1% of women) were hospitalized urgently and the rest of the patients were hospitalized by plan. The data of the second survey showed that more patients (p<0.05) were hospitalized urgently in comparison with the first survey (71.9% of men and 70.5% of women).

The hospitalization process is one of the most important factors determining patients' satisfaction with health organizations and their services. The analysis of the data has shown that the answers of men and women to the question "how much time did they spend in the reception" did not differ. Two thirds (66.4% and 75.3%) of the participants spent less than 30 minutes in the hospital reception office, however 8.9% of the first survey participants and 6.8% of the second survey participants spent more than one hour in the reception waiting for hospitalization. The majority of the patients of both surveys (89.9% and 83.5% respectively) pointed out that the reception personnel introduced to them the rules within the hospital. Physical environment, for example, cleanliness of the air in the ward and the wards itself, silence, food quality, are very important factors determining patients' mood and the rate of healing. Due to this fact, it was very important to discover how patients evaluated their surroundings (9,10). The patients were asked to indicate, whether it was comfortable for them to take a shower or bath and to make phone calls. More than two thirds of the patients were satisfied with the existing possibility to make phone calls and to take a shower or bath (75.5% and 76.8% respectively). The majority (94.2%) of the participants of the survey pointed out that their relatives and them were very satisfied with the visiting hours. Only every tenth (12.2%) patient noted that the hospital didn't have enough visual aids to help orientate in the hospital. One tenth (9.3%) of the respondents mentioned that they had problems with the non-medical staff (lift operators, cloakroom attendants, etc.).

The number of patients, who evaluated the cleanliness of the ward as excellent and very good, increased during the analyzed period. In the first survey every second patient (49.2%) estimated the neatness in the ward excellent and very good; 44.1% evaluated it as good; 6.1% of the patients indicated that the neatness in the ward was satisfactory and 0.6% said it was bad; while in the second survey the number of patients who evaluated the cleanliness of the ward as excellent and very good increased to 59.9%; the number of patients who chose the answer good decreased to 36.4%, and satisfactory decreased to 2.7% (Fig. 1).

The data of both surveys showed that patients evaluate food quality more critically than hospital physical environment. Comparing the food quality ratings we have ascertained that the number of patients who rated the food quality as good did not change: every second patient rated the food quality as good (Fig. 2).

The number of those who rated food quality as satisfactory decreased from 29.8% to 22.0% in the second survey, p < 0.05. The number of those who rated food quality as very good, on the contrary, increased from 12.7% to 18.1%, p<0.05 (Fig. 2).

Every hospitalized person hopes to get immediate and necessary help. That is why, while evaluating the promptness of health personnel, we asked the patients to note, how fast the nurse provided them necessary help. Every tenth patient in the first (11.5%) and in the second (12.0%) surveys noted that they were attended in an instant. While comparing the data of both surveys, we established that the number of patients, who received help very quickly, increased from 33.7% to 40.7%, p<0.05. The number of patients, who chose a negative estimation (i.e. very late, not fast, or not fast enough) decreased in 2002 (Fig. 3).

In order to create a better psychological environment in the health care institution, it is very important to know, how patients assess communication skills of the health care personnel and attention paid to them. Every third patient in first survey said that nurse communication and attentiveness were good (32.9%), very good (39.6%) and excellent (17.5%). The number of those who chose the answer excellent increased to 25% and the part of those who said that it was satisfactory decreased four times, from 8.3% to 2.1% respectively, during the second survey (Fig. 4).

While informing people about healthy lifestyle, causes of diseases, it is possible to change their attitudes and even behavior in respect of their health (11). Physicians play an important role while encouraging people to lead healthier lifestyles. Due to this we compared the opinions of the patients on the activeness of the nurses while explaining the causes and consequences of diseases, the ways of healthy nutrition and taking medicines. The analysis of the data of both surveys showed that the activeness of the nurses during the analyzed period did change. The number of patients, who claimed that the nurses said nothing of the causes of their diseases, decreased from 9.6% to 5.6%, p<0.05. The activeness of nurses while explaining the rules of hospital behavior has become better. According to the data of the first survey, more than two thirds (73.3%) of the patients pointed out, that the nurses always, very often, and often explained the ways of taking medicines, suggest the best nutrition and other. During the second survey the number of such nurses increased even more: from 73.3% to 88.8%, p<0.05.

The research done in the Western European countries emphasizes that communicating with the patient, providing information on the disease and its treatment, teaching of healthy lifestyle has a big influence on the patient's satisfaction with the health care services (11)(12)(13). The results received from researches and educational programs proved that educating patients improves the outcomes of the illness, it shortens the length of hospitalization, reduces need for further hospitalizations, and it also allows to use health services more effectively (14). Due to all that the efficiency of health care services increases.

The majority of the patients stated, that the physicians had completely explained the causes of their diseases, respectively 88.3% and 88. 1 5 in 2000 and 2002. Also the majority of the patients pointed out, that the physicians had told them about their treatment and future procedures, and possible adverse reactions. The majority (87.0%) of the participants of the second survey responded that the physicians paid enough attention to them during their daily visitations. Almost all (95.9% of the first and 94.9% of the second survey) of the respondents rated the physicians' attentiveness good, very good, and excellent.

Summarizing the results of both surveys, we concluded that the majority of the respondents were satisfied with the hospitalization order in the Lithuanian HPH network hospitals and with the timely and quickly rendered assistance. The number of patients, who rated the cleanliness and order in the ward very good and excellent, increased during the analyzed period. The patients evaluate the food quality in the hospitals more critically, but it is noteworthy that according to the data gathered in the second survey, the number of patients who rated food quality very good increased. The patients started evaluate the nurse's educational activity and behavior more positively. Also the number of patients, who rated the nurses' communicating skills and work as excellent, increased. Patient satisfaction with the physicians' work and attentiveness did not change during the analyzed period. The majority of the respondents rated the physicians' activity as good, very good, and excellent. Due to the fact, that the improvement of the quality of health services is based on a premise that every job and effort can always be improved, there is a reason to hope that having examined the factors that influence patients' evaluations, in the future, there will be a possibility to raise patients' satisfaction with health care services.

+
Conclusions

1.Following the data of both surveys, the majority of the patients who were treated in the Health Promoting Hospitals in Lithuania assessed the physical environment of the hospital positively. The number of patients, who evaluated the cleanliness of the ward positively, increased; the number of those, who assessed the hospital food quality negatively, decreased.

2.The opinion of patients on the nurses' communication skills, attentiveness and educational activity improved.

3.The patients' evaluation of the physician's attentiveness while explaining the causes and treatment of the disease did not change. The majority of the patients, hospitalized in the Lithuanian HPH network hospitals, evaluated the physician's work positively.

4.The approved system of patient's satisfaction monitoring in Lithuanian HPH network is very simple and it is a useful tool for the management of the quality of health care in the hospital.

Fig. 1 .The evaluation of the cleanliness in the ward in 2000 and 2002 * -p<0.05, comparing between 2000 and 2002.
+
Fig. 2 .The evaluation of the food quality in 2000 and 2002 Irena Misevičienė, Žemyna Milašauskienė MEDICINA (2003) 39 tomas, Nr.
+
Fig. 3 .Fig. 4 .The evaluation of the promptness of help in 2000 and 2002 * -p<0.05, comparing between 2000 and 2002. The evaluation of the attitude and communication of nurses in 2000 and 2002 * -p<0.05, comparing between 2000 and 2002.
+ MEDICINA (2003) 39 tomas, Nr. 6 + + + +
+
Acknowledgement.

We thank the chiefs of the Lithuanian HPH network hospitals for organizing the patient's satisfaction survey and for their active participation.

+
+ +
+ + + + + + National survey of hospital patients + + SBruster + + + BJarmen + + + NBosanquet + + + DWeston + + + RErens + + + TLDelbanco + + + + BMJ + + 10 + + + + + Bruster S, Jarmen B, Bosanquet N, Weston D, Erens R, Delbanco TL. National survey of hospital patients. BMJ 1994; 10:1542-6. + + + + + Innovation in patient-centred education + + BEller + + + MGerties + + + SEdgman-Levitan + + + JDaley + + + TLDelbaro + + + + Through the patient's eyes +
San Francisco
+ + Jossen-Bass Publisher + + + +
+ 1st ed + Eller B. Innovation in patient-centred education. In: Gerties M, edgman-Levitan S, Daley J, Delbaro TL, editors. Through the patient's eyes.1st ed. San Francisco: Jossen-Bass Pub- lisher; 1993. p. 96-118. +
+ + + + Increasing understanding of patient needs during and after hospitalisation + + DHGustafson + + + NKArora + + + ECNelson + + + EWBoberg + + + + Jt Comn Qual Improv + + 27 + 2 + + + + + Gustafson DH, Arora NK, Nelson EC, Boberg EW. Increas- ing understanding of patient needs during and after hospi- talisation. Jt Comn Qual Improv 2001;27(2):81-92. + + + + + + JHealy + + + MMckee + + + MMonit ; Gerties + + + SEdgman-Levitan + + + JDaley + + + TLDelbaro + + Through the patient's eyes +
San Francisco
+ + Jossen-Bass Publisher + + +
+ 1st ed + Healy J, Mckee M. Monit. In: Gerties M, Edgman-Levitan S, Daley J, Delbaro TL, editors. Through the patient's eyes.1st ed. San Francisco: Jossen-Bass Publisher; 1993. +
+ + + + Integrated quality development in public healthcare + + JOvretveit + + + + Norwegian Medical Association + + 128 + + + + Ovretveit J. Integrated quality development in public health- care. Norwegian Medical Association, Oslo, Norway; 1999. p. 128. + + + + + Medical participation in and leadership of quality programmes + + JOvretveit + + + + J of Management in medicine + + 10 + 5 + + + + + Ovretveit J. Medical participation in and leadership of quality programmes. J of Management in medicine 1996;10(5):21- 9. + + + + + Pacientų poreikių bei nuomonės apie teikiamas sveikatos priežiūros paslaugas vertinimas. (Assessment of patients' needs and opinion on health care services.) Nacionalinės sveikatos tarybos metinis praneš imas + + EŽebienė + + + IMisevičienė + + + ZMilašauskienė + + + + + + + Žebienė E, Misevičienė I, Milašauskienė Z. Pacientų poreikių bei nuomonės apie teikiamas sveikatos priežiūros paslaugas vertinimas. (Assessment of patients' needs and opinion on health care services.) Nacionalinės sveikatos tarybos metinis praneš imas 2001; 87-90. + + + + + Pacientų pasitenkinimas ligoninės medicinos personalo darbu. (Patients' satisfaction with the work of medical staff of hospital) + + IMisevičiene + + + ŽMilašauskienė + + + + Medicina (Kaunas + + 38 + 5 + + + + + Misevičiene I, Milašauskienė Ž. Pacientų pasitenkinimas ligoninės medicinos personalo darbu. (Patients' satisfaction with the work of medical staff of hospital). Medicina (Kau- nas) 2002;38(5):559-65. + + + + + Patient satisfaction: a customer service approach + + JMarr + + + MGreengarten + + + + Health Manage Forum + + 8 + 3 + + + + + Marr J, Greengarten M. Patient satisfaction: a customer service approach. Health Manage Forum 1995;8(3):52-6. + + + + + Enchanting physical comfort + + JDWaller + + + MGerties + + + SEdgman-Levitan + + + JDaley + + + TLDelbaro + + + + Through the patient's eyes +
San Francisco
+ + Jossen-Bass Publisher + + + +
+ 1st ed. + Waller JD. Enchanting physical comfort. In: Gerties M, Edgman-Levitan S, Daley J, Delbaro TL editors. Through the patient's eyes. 1st ed. San Francisco: Jossen-Bass Pub- lisher; 1993. p. 119-153. +
+ + + + Evidence on patient-doctor communication + + MSteward + + + JBBrown + + + HBoon + + + JGalajda + + + LMeredith + + + MSangster + + + + Cancer Prev Control + + 3 + + + + + Steward M, Brown JB, Boon H, Galajda J, Meredith L, Sangster M. Evidence on patient-doctor communication. Cancer Prev Control 1999; 3:25-30. + + + + + On the relationship between customer participation and satisfaction: two frameworks + + DLKellogg + + + WEYoungdahl + + + DEBowen + + + + International J of service Industry Management + + 8 + + + + + Kellogg DL, Youngdahl WE, Bowen DE. On the relation- ship between customer participation and satisfaction: two frameworks. International J of service Industry Management 1997;8:206-19. + + + + + Using patient feedback for quality improvement + + KTasa + + + RBaker + + + MMurray + + + + Quality Management in Health Care + + 8 + + + + + Tasa K, Baker R, Murray M. Using patient feedback for qua- lity improvement. Quality Management in Health Care 1996;8:206-19. + + + + + Patient satisfaction and experience with health services and quality of care + + TRZastowny + + + WCStratman + + + EHAdams + + + MLFox + + + + Quality Management in Health Care + + 3 + + + + + Zastowny TR, Stratman WC, Adams EH, Fox ML. Patient satisfaction and experience with health services and quality of care. Quality Management in Health Care 1995;3:50-61. + + + + + Pacientų buvo prašoma įvertinti ligoninės fizinę aplinką (tvarką, švarą, maisto kokybę), slaugytojų ir gydytojų darbo kokybę (rūpestingumą, d ė mesingumą, informavimą apie paslaugas, ligos priežastis, naudojamus gydymo ir diagnostikos metodus) nuo 1 (labai blogai) iki 6 (puikiai) balų. Nustatyta, kad per analizuojamą laikotarpį pacientų, teigiamai įvertinusių tvarką, švarą palatoje, padaugėjo nuo 49,2 iki 59,9 proc., p<0,05. Pirminės ir pakartotinės apklausos duomenimis, ligoninėje gaunamo maisto kokybę ligoniai vertino kritiškiau palyginti su ligoninės fizine aplinka. Per analizuojamą laikotarpį pacientų, patenkinamai įvertinusių maisto kokybę sumažėjo nuo 29,8 iki 22,0 proc., p<0,05. Pagerėjo pacientų atsiliepimai apie slaugytojų bendravimą, d ė mesingumą bei aktyvumą aiškinant apie ligos priežastis ir pasekmes, apie tai, kaip elgtis ligoninėje. Pacientų vertinimai apie gydytojų veiklą nekito. Gydytojų dėmesingumą, bendravimą ir aktyvumą aiškinant ligos priežastis dauguma (95,1 ir 94,9 proc.) įvertino labai gerai ir puikiai + + + Santrauka. Darbo tikslas. Išanalizuoti ir įvertinti pacientų, gydomų Lietuvos sveikatą stiprinančių ligoninių tinklo ligoninėse, pasitenkinimo teikiamomis paslaugomis pokyčius. 2000 m. Lietuvos sveikatą stiprinančių ligoninių tinklo ligoninėse atliktoje apklausoje dalyvavo 1271 pacientas + + + + + Pacientų pasitenkinimas teikiamomis paslaugomis buvo vertinamas naudojant standartizuotą anoniminę anketą. Pacientų pasitenkinimo tyrimas -tai nesudėtingas teikiamų paslaugų kokybės sudėtinės dalies tyrimas bei objektyvi prielaida paslaugų kokybei gerinti + Santrauka. Darbo tikslas. Išanalizuoti ir įvertinti pacientų, gydomų Lietuvos sveikatą stiprinančių ligoninių tinklo ligoninėse, pasitenkinimo teikiamomis paslaugomis pokyčius. 2000 m. Lietuvos sveikatą stiprinančių ligoninių tinklo ligoninėse atliktoje apklausoje dalyvavo 1271 pacientas, 2002 m. -1467. Pacientų pasitenkinimas teikiamomis paslaugomis buvo vertinamas naudojant standartizuotą anoniminę anketą. Pacientų buvo prašoma įvertinti ligoninės fizinę aplinką (tvarką, švarą, maisto kokybę), slaugytojų ir gydytojų darbo kokybę (rūpestingumą, d ė mesingumą, informavimą apie paslaugas, ligos priežastis, naudojamus gydymo ir diagnostikos metodus) nuo 1 (labai blogai) iki 6 (puikiai) balų. Nustatyta, kad per analizuojamą laikotarpį pacientų, teigiamai įvertinusių tvarką, švarą palatoje, padaugėjo nuo 49,2 iki 59,9 proc., p<0,05. Pirminės ir pakartotinės apklausos duomenimis, ligoninėje gaunamo maisto kokybę ligoniai vertino kritiškiau palyginti su ligoninės fizine aplinka. Per analizuojamą laikotarpį pacientų, patenkinamai įvertinusių maisto kokybę sumažėjo nuo 29,8 iki 22,0 proc., p<0,05. Pagerėjo pacientų atsiliepimai apie slaugytojų bendravimą, d ė mesingumą bei aktyvumą aiškinant apie ligos priežastis ir pasekmes, apie tai, kaip elgtis ligoninėje. Pacientų vertinimai apie gydytojų veiklą nekito. Gydytojų dėmesingumą, bendravimą ir aktyvumą aiškinant ligos priežastis dauguma (95,1 ir 94,9 proc.) įvertino labai gerai ir puikiai. Pacientų pasitenkinimo tyrimas -tai nesudėtingas teikiamų paslaugų kokybės sudėtinės dalies tyrimas bei objektyvi prielaida paslaugų kokybei gerinti. + + +
+
+
+
+
+ diff --git a/tests/files/small.json b/tests/files/small.json new file mode 100644 index 0000000..aa0da78 --- /dev/null +++ b/tests/files/small.json @@ -0,0 +1,65 @@ +{ + "title": "Dummy Example File", + "authors": [ + { + "name": "Brewster Kahle", + "given_name": "Brewster", + "surname": "Kahle", + "affiliation": { + "department": "Faculty ofAgricultrial Engineering", + "laboratory": "Plant Physiology Laboratory", + "institution": "Technion-Israel Institute of Technology", + "address": { + "postCode": "32000", + "settlement": "Haifa", + "country": "Israel" + } + } + }, + {"name": "J Doe", "given_name": "J", "surname": "Doe"} + ], + "journal": { + "name": "Dummy Example File. Journal of Fake News. pp. 1-2. ISSN 1234-5678" + }, + "date": "2000", + "citations": [ + { "authors": [{"name": "A Seaperson", "given_name": "A", "surname": "Seaperson"}], + "date": "2001", + "id": "b0", + "index": 0, + "issue": null, + "journal": "Letters in the Alphabet", + "publisher": null, + "title": "Everything is Wonderful", + "url": null, + "volume": "20", + "unstructured": null, + "arxiv_id": null, + "doi": null, + "pages": "1-11", + "pmcid": null, + "pmid": null + }, + { "authors": [], + "date": "2011-03-28", + "id": "b1", + "index": 1, + "issue": null, + "journal": "The Dictionary", + "publisher": null, + "title": "All about Facts", + "url": null, + "volume": "14", + "unstructured": null, + "arxiv_id": null, + "doi": null, + "pmcid": null, + "pmid": null + } + ], + "abstract": "Everything you ever wanted to know about nothing", + "body": "Introduction \nEverything starts somewhere, as somebody [1] once said. \n\n In Depth \n Meat \nYou know, for kids. \n Potatos \nQED.", + "grobid_timestamp": "2018-04-02T00:31+0000", + "grobid_version": "0.5.1-SNAPSHOT", + "language_code": "en" +} diff --git a/tests/test_grobid2json.py b/tests/test_grobid2json.py index 8497b10..e970868 100644 --- a/tests/test_grobid2json.py +++ b/tests/test_grobid2json.py @@ -2,7 +2,7 @@ import xml import json import pytest -from grobid2json import * +from grobid_tei_xml.grobid2json import teixml2json def test_small_xml(): @@ -12,6 +12,9 @@ def test_small_xml(): with open('tests/files/small.json', 'r') as f: json_form = json.loads(f.read()) + parsed = teixml2json(tei_xml) + for i in range(len(parsed['citations'])): + assert parsed['citations'][i] == json_form['citations'][i] assert teixml2json(tei_xml) == json_form def test_invalid_xml(): @@ -20,3 +23,28 @@ def test_invalid_xml(): teixml2json("this is not XML") with pytest.raises(ValueError): teixml2json("") + + +def test_grobid_teixml2json() -> None: + + with open("tests/files/example_grobid.tei.xml", "r") as f: + blob = f.read() + + obj = teixml2json(blob, True) + + assert ( + obj["title"] + == "Changes of patients' satisfaction with the health care services in Lithuanian Health Promoting Hospitals network" + ) + + ref = [c for c in obj["citations"] if c["id"] == "b12"][0] + assert ref["authors"][0] == {"given_name": "K", "name": "K Tasa", "surname": "Tasa"} + assert ref["journal"] == "Quality Management in Health Care" + assert ref["title"] == "Using patient feedback for quality improvement" + assert ref["date"] == "1996" + assert ref["pages"] == "206-225" + assert ref["volume"] == "8" + assert ( + ref["unstructured"] + == "Tasa K, Baker R, Murray M. Using patient feedback for qua- lity improvement. Quality Management in Health Care 1996;8:206-19." + ) -- cgit v1.2.3