expand_abbr_medical.sh
2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Copyright 2014 Mirsk Digital ApS (Author: Andreas Kirkedal)
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
# WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
# MERCHANTABLITY OR NON-INFRINGEMENT.
# See the Apache 2 License for the specific language governing permissions and
# limitations under the License.
cat $1 | perl -pe 's/([P|p])\.?[t|T]\./\1atienten/g' | \
perl -pe 's/([A|a])fd\./\1fdeling/g' | \
perl -pe 's/ve\./venstre/g' | \
perl -pe 's/hø\./højre/g' | \
perl -pe 's/ m.?h.?p\. / med henblik på /g' | \
perl -pe 's/mdr\./måneder/g' | \
perl -pe 's/ p ?n / p\.n\. /g' | \
perl -pe 's/konf\./konference/g' | \
perl -pe 's/i a ?d ?p/i a\.d\.p\./g' | \
perl -pe 's/([T|t])abl\./\1ablet/g' | \
perl -pe 's/dagl\./daglig/g' | \
perl -pe 's/nat\./naturlige/g' | \
perl -pe 's/([Aa])\.[Ss]\.[Aa]\./\1namnese som anført/g' | \
perl -pe 's/\/([al|nra])/ \/ \1/g' | \
perl -pe 's/ Hb / hæmoglobin /g' | \
perl -pe 's/([P|p])\.?g\.?a\./\1å grund af/g' | \
perl -pe 's/([R|r])\.?p\./\1ecipe/g' | \
perl -pe 's/[R|r]tg\./\1øntgen/g' | \
perl -pe 's/([S|s])v\.t\./\1varende til/g' | \
perl -pe 's/([S|s]t\.p\.) et c./\1_et_c\./g' | \
perl -pe 's/([S|s]tet) p et c/\1 p_et_c\./g' | \
perl -pe 's/ BS([\.|:|,| ])/Blodsukker\1/g' | \
perl -pe 's/ UE([\.|:| ])/Underekstremitet\1/g' | \
perl -pe 's/ AF([\.|:|,])/ Atrieflagren\1/g' | \
perl -pe 's/ AS([\.|:|,| ])/ Aortastenose\1/g' | \
perl -pe 's/ UL([\.|:|,| ])/ Ultralyd\1/g' | \
perl -pe 's/ BT([\.|:|,| ])/Blodtryk\1/g' | \
perl -pe 's/([S|s])at\./\1aturation/g' | \
perl -pe 's/([E|e])\.?v\.?t\.?/\1ventuelt/g' | \
perl -pe 's/([S|s])t\. ?([p|c]\.)/\1tet\. \2/g' | \
perl -pe 's/([S|s]tet) ?([p|c])/\1 \2\./g' | \
perl -pe 's/ ([D|d])\. / \1en /g' | \
perl -pe 's/([V|v])esk?\. ?resp\./\1esikulær respiration/g'