Anleitung zur Verarbeitung der CSV-Hochpreislisten

Die Pharmazeutische Gehaltskasse stellt die im Zuge der monatlichen Rezepteinreichung erstellten Hochpreislisten seit April 2021 zusätzlich zur PDF-Version auch im CSV-Format zur Verfügung. CSV ist ein textbasiertes Datenformat, das auch mit dem Programm MS Office Excel verarbeitet und ausgewertet werden kann. Hier finden Sie eine Anleitung dazu!

Fehler bei der Verarbeitung der Vorlage.
Java method "com.sun.proxy.$Proxy114.getFileEntryByUuidAndGroupId(String, long)" couldn't be called: Can't convert the 1st argument's value to the target Java type, String. The type of the actual value was: number (wrapper: f.t.SimpleNumber)

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fileEntry = dlFileEntryUtil.g...  [in template "20097#20123#37478" at line 38, column 13]
----
1<#-- Get DLFileEntry Service --> 
2<#assign dlFileEntryUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")/> 
3 
4<div class="content__text"> 
5    <#if downloadable_document.getSiblings()?has_content> 
6        <#list downloadable_document.getSiblings() as cur_document> 
7 
8            <#-- parse document url --> 
9            <#assign download_url = cur_document.getData() /> 
10            <#assign parts = stringUtil.split(download_url, "/") /> 
11            <#assign group_id = 0 /> 
12            <#assign folder_id = 0 /> 
13            <#assign doc_name = "" /> 
14            <#assign last = "" /> 
15 
16            <#list parts as part> 
17                <#if part_index == 2> 
18                    <#assign group_id = getterUtil.getLong(part) /> 
19                <#elseif part_index == 3> 
20                    <#assign folder_id = getterUtil.getLong(part) /> 
21                <#elseif part_index == 4> 
22                    <#assign doc_name = part /> 
23                <#elseif part_index == 5> 
24                    <#assign last = part /> 
25                </#if> 
26            </#list> 
27 
28            <#-- extract document uuid --> 
29            <#assign uuid = 0 /> 
30            <#assign parts2 = stringUtil.split(last, "?") /> 
31            <#list parts2 as part2> 
32                <#if part2_index == 0> 
33                    <#assign uuid = part2 /> 
34                </#if> 
35            </#list> 
36 
37            <#-- query size and extension --> 
38            <#assign fileEntry = dlFileEntryUtil.getFileEntryByUuidAndGroupId(uuid, group_id) /> 
39            <#assign document_type = fileEntry.getExtension() /> 
40            <#assign document_size = fileEntry.getSize() /> 
41 
42            <a href="${cur_document.getData()}" class="link link__icon mb-15" download> 
43                <span class="i-download"></span>${cur_document.document_name_text.getData()} (${document_type}/${formatBytes(document_size)}) 
44            </a> 
45        </#list> 
46    </#if> 
47</div> 
48 
49 
50<#-- 
51# Format Number of Bytes in SI Units 
52# --> 
53<#function formatBytes num> 
54    <#assign order     = num?round?c?length /> 
55    <#assign thousands = ((order - 1) / 3)?floor /> 
56    <#if (thousands < 0)><#assign thousands = 0 /></#if> 
57    <#assign siMap = [ {"factor": 1, "unit": "B"}, {"factor": 1000, "unit": "KB"}, {"factor": 1000000, "unit": "MB"}, {"factor": 1000000000, "unit":"GB"}, {"factor": 1000000000000, "unit": "TB"} ]/> 
58    <#assign siStr = (num / (siMap[thousands].factor))?string("0.#")?replace(",", ".") + siMap[thousands].unit /> 
59    <#return siStr /> 
60</#function>