Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
8f90f001
Commit
8f90f001
authored
Nov 23, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/核算单元' into develop
parents
36fa2023
745fef27
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
5 deletions
+51
-5
performance/Performance.Services/ExtractExcelService/ExtractDtos/ExtractTransDto.cs
+6
-0
performance/Performance.Services/ExtractExcelService/ExtractHelper/WriteDataHelper.cs
+31
-4
performance/Performance.Services/ExtractExcelService/ExtractService.cs
+11
-1
performance/Performance.Services/ExtractExcelService/QueryService.cs
+3
-0
No files found.
performance/Performance.Services/ExtractExcelService/ExtractDtos/ExtractTransDto.cs
View file @
8f90f001
...
...
@@ -40,6 +40,12 @@ public class ExtractTransDto
public
string
SheetName
{
get
;
set
;
}
/// <summary>
/// ex_type >> ename
/// 根据ename中的关键字门诊、住院取对应的核算单元
/// </summary>
public
string
EName
{
get
;
set
;
}
/// <summary>
/// 核算单元(门诊医生)
/// </summary>
public
string
OutDoctorAccounting
{
get
;
set
;
}
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/WriteDataHelper.cs
View file @
8f90f001
...
...
@@ -197,8 +197,17 @@ public static void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType s
{
var
departments
=
data
.
Select
(
s
=>
s
.
Department
??
""
)
/*.Where(w => !string.IsNullOrEmpty(w))*/
.
Distinct
().
ToList
();
var
filed
=
sheet
.
SheetName
.
Contains
(
"住院"
)
?
fieldInpat
:
fieldOut
;
if
(
sheet
.
SheetName
.
Contains
(
"工作量"
))
var
filed
=
new
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>();
if
(
sheetType
==
SheetType
.
Income
)
{
if
(
sheet
.
SheetName
.
Contains
(
"住院"
)
||
sheet
.
SheetName
.
Contains
(
"门诊"
))
filed
=
sheet
.
SheetName
.
Contains
(
"住院"
)
?
fieldInpat
:
fieldOut
;
var
ename
=
data
.
Where
(
w
=>
w
.
SheetName
==
sheet
.
SheetName
)?.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
EName
))?.
EName
;
if
(
ename
.
Contains
(
"住院"
)
||
ename
.
Contains
(
"门诊"
))
filed
=
ename
.
Contains
(
"住院"
)
?
fieldInpatOut
:
fieldOutInpat
;
}
else
if
(
sheet
.
SheetName
.
Contains
(
"工作量"
))
{
filed
=
sheet
.
SheetName
.
Contains
(
"医生"
)
?
fieldDoctor
:
fieldNurse
;
}
...
...
@@ -255,8 +264,8 @@ public static void WriteSheetData(ISheet sheet, PerSheetPoint point, SheetType s
var
deptContents
=
new
Dictionary
<
int
,
string
>
{
{
1
,
item
.
Department
},
{
2
,
(
sheet
.
SheetName
.
Contains
(
"门诊"
)
?
deptData
.
FirstOrDefault
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
OutNurseAccounting
))?.
OutNurseAccounting
{
2
,
(
sheet
.
SheetName
.
Contains
(
"门诊"
)
?
deptData
.
FirstOrDefault
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
OutNurseAccounting
))?.
OutNurseAccounting
:
deptData
.
FirstOrDefault
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
InpatNurseAccounting
))?.
InpatNurseAccounting
)
??
item
.
NurseAccount
},
{
3
,
(
sheet
.
SheetName
.
Contains
(
"门诊"
)
?
deptData
.
FirstOrDefault
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
OutDoctorAccounting
))?.
OutDoctorAccounting
...
...
@@ -316,6 +325,24 @@ public static string HasValue(params string[] list)
{
"核算单元(医技组)"
,
(
dto
)
=>
dto
.
OutTechnicAccounting
},
};
/// <summary> 住院核算单元 </summary>
private
static
readonly
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>
fieldInpatOut
=
new
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>
{
{
"科室名称"
,
(
dto
)
=>
dto
.
Department
},
{
"核算单元(医生组)"
,
(
dto
)
=>
new
string
[]{
dto
.
InpatDoctorAccounting
,
dto
.
OutDoctorAccounting
}.
FirstOrDefault
(
w
=>!
string
.
IsNullOrEmpty
(
w
))
},
{
"核算单元(护理组)"
,
(
dto
)
=>
new
string
[]{
dto
.
InpatNurseAccounting
,
dto
.
OutNurseAccounting
}.
FirstOrDefault
(
w
=>!
string
.
IsNullOrEmpty
(
w
))
},
{
"核算单元(医技组)"
,
(
dto
)
=>
new
string
[]{
dto
.
InpatTechnicAccounting
,
dto
.
OutTechnicAccounting
}.
FirstOrDefault
(
w
=>!
string
.
IsNullOrEmpty
(
w
))
},
};
/// <summary> 门诊核算单元 </summary>
private
static
readonly
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>
fieldOutInpat
=
new
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>
{
{
"科室名称"
,
(
dto
)
=>
dto
.
Department
},
{
"核算单元(医生组)"
,
(
dto
)
=>
new
string
[]{
dto
.
OutDoctorAccounting
,
dto
.
InpatDoctorAccounting
}.
FirstOrDefault
(
w
=>!
string
.
IsNullOrEmpty
(
w
))
},
{
"核算单元(护理组)"
,
(
dto
)
=>
new
string
[]{
dto
.
OutNurseAccounting
,
dto
.
InpatNurseAccounting
}.
FirstOrDefault
(
w
=>!
string
.
IsNullOrEmpty
(
w
))
},
{
"核算单元(医技组)"
,
(
dto
)
=>
new
string
[]{
dto
.
OutTechnicAccounting
,
dto
.
InpatTechnicAccounting
}.
FirstOrDefault
(
w
=>!
string
.
IsNullOrEmpty
(
w
))
},
};
/// <summary> 医生工作量 </summary>
private
static
readonly
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>
fieldDoctor
=
new
Dictionary
<
string
,
Func
<
ExtractTransDto
,
string
>>
{
...
...
performance/Performance.Services/ExtractExcelService/ExtractService.cs
View file @
8f90f001
...
...
@@ -24,6 +24,7 @@ public class ExtractService : IAutoInjection
private
readonly
CustomDataWrite
customDataWrite
;
private
readonly
PerforPerallotRepository
perallotRepository
;
private
readonly
PerforCollectdataRepository
collectdataRepository
;
private
readonly
PerforExtypeRepository
extypeRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforPerdeptdicRepository
perdeptdicRepository
;
private
readonly
PerforCofdrugtypefactorRepository
drugtypefactorRepository
;
...
...
@@ -39,6 +40,7 @@ public class ExtractService : IAutoInjection
CustomDataWrite
customDataWrite
,
PerforPerallotRepository
perallotRepository
,
PerforCollectdataRepository
collectdataRepository
,
PerforExtypeRepository
extypeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforPerdeptdicRepository
perdeptdicRepository
,
PerforCofdrugtypefactorRepository
drugtypefactorRepository
...
...
@@ -54,6 +56,7 @@ PerforCofdrugtypefactorRepository drugtypefactorRepository
this
.
customDataWrite
=
customDataWrite
;
this
.
perallotRepository
=
perallotRepository
;
this
.
collectdataRepository
=
collectdataRepository
;
this
.
extypeRepository
=
extypeRepository
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
perdeptdicRepository
=
perdeptdicRepository
;
this
.
drugtypefactorRepository
=
drugtypefactorRepository
;
...
...
@@ -268,15 +271,20 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
t
.
Department
=
string
.
IsNullOrEmpty
(
t
.
Department
)
?
"(空白)"
:
t
.
Department
;
});
var
types
=
extypeRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
)
??
new
List
<
ex_type
>();
var
dict
=
personService
.
GetDepartments
(
hospitalId
)?.
ToList
();
if
(
dict
==
null
||
!
dict
.
Any
())
{
return
results
.
GroupBy
(
t
=>
new
{
t
.
Department
,
t
.
Category
,
t
.
Source
}).
Select
(
t
=>
new
ExtractTransDto
{
SheetName
=
t
.
Key
.
Source
,
Department
=
t
.
Key
.
Department
,
Category
=
t
.
Key
.
Category
,
Value
=
t
.
Sum
(
group
=>
group
.
Fee
)
==
0
?
null
:
t
.
Sum
(
group
=>
group
.
Fee
),
EName
=
types
.
FirstOrDefault
(
w
=>
w
.
Id
==
t
.
FirstOrDefault
().
TypeId
)?.
EName
}).
ToList
();
}
dict
.
ForEach
(
t
=>
{
...
...
@@ -302,6 +310,7 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
InpatNurseAccounting
=
t
.
inner
.
FirstOrDefault
(
f
=>
f
.
Department
==
dept
)?.
InpatNurseAccounting
?.
AccountingUnit
,
InpatTechnicAccounting
=
t
.
inner
.
FirstOrDefault
(
f
=>
f
.
Department
==
dept
)?.
InpatTechnicAccounting
?.
AccountingUnit
,
SpecialAccounting
=
t
.
inner
.
FirstOrDefault
(
f
=>
f
.
Department
==
dept
)?.
SpecialAccounting
?.
AccountingUnit
??
dept
,
EName
=
types
.
FirstOrDefault
(
w
=>
w
.
Id
==
t
.
outer
.
TypeId
)?.
EName
,
};
});
...
...
@@ -317,7 +326,8 @@ private List<ExtractTransDto> StandDataFormat(int hospitalId, List<ex_result> re
InpatDoctorAccounting
=
t
.
First
().
InpatDoctorAccounting
,
InpatNurseAccounting
=
t
.
First
().
InpatNurseAccounting
,
InpatTechnicAccounting
=
t
.
First
().
InpatTechnicAccounting
,
SpecialAccounting
=
t
.
First
().
SpecialAccounting
SpecialAccounting
=
t
.
First
().
SpecialAccounting
,
EName
=
t
.
FirstOrDefault
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
EName
)).
EName
});
return
groupdata
.
ToList
();
...
...
performance/Performance.Services/ExtractExcelService/QueryService.cs
View file @
8f90f001
...
...
@@ -223,6 +223,7 @@ private List<ex_result> ExtractModuleData(per_allot allot, string groupName, boo
DoctorName
=
t
.
DoctorName
,
PersonnelNumber
=
t
.
PersonnelNumber
,
Source
=
f
.
ModuleName
,
TypeId
=
typeId
,
DatabaseType
=
config
.
DataBaseType
,
ConfigId
=
config
.
Id
,
AllotId
=
allot
.
ID
,
...
...
@@ -294,6 +295,7 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool
DoctorName
=
t
.
DoctorName
,
PersonnelNumber
=
t
.
PersonnelNumber
,
Source
=
modulename
,
TypeId
=
typeId
,
DatabaseType
=
config
.
DataBaseType
,
ConfigId
=
config
.
Id
,
AllotId
=
allot
.
ID
,
...
...
@@ -356,6 +358,7 @@ private List<ex_result> ExtractSpecialData(per_allot allot, string groupName, bo
DoctorName
=
t
.
DoctorName
,
PersonnelNumber
=
t
.
PersonnelNumber
,
Source
=
"4.2 特殊核算单元绩效测算表"
,
TypeId
=
typeId
,
DatabaseType
=
config
.
DataBaseType
,
ConfigId
=
config
.
Id
,
AllotId
=
allot
.
ID
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment