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
e0dc34a8
Commit
e0dc34a8
authored
Jun 02, 2021
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/提取前检查逻辑修改' into develop
parents
2216bc23
e553510f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
112 additions
and
3 deletions
+112
-3
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.EntityModels/Entity/ex_module.cs
+5
-0
performance/Performance.Services/ExConfigService.cs
+101
-2
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
e0dc34a8
...
@@ -1851,7 +1851,7 @@
...
@@ -1851,7 +1851,7 @@
</member>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.Type"
>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.Type"
>
<summary>
<summary>
1 返回accounting列表 2 返回核算单元
类型 3 返回核算单元
1 返回accounting列表 2 返回核算单元
3 返回核算单元类型
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.UnitType"
>
<member
name=
"P:Performance.DtoModels.AccoungingRequest.UnitType"
>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
e0dc34a8
...
@@ -2331,6 +2331,11 @@
...
@@ -2331,6 +2331,11 @@
只读 0、否 1、是
只读 0、否 1、是
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ex_module.CheckScriptId"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ex_result"
>
<member
name=
"T:Performance.EntityModels.ex_result"
>
<summary>
<summary>
...
...
performance/Performance.EntityModels/Entity/ex_module.cs
View file @
e0dc34a8
...
@@ -55,5 +55,10 @@ public class ex_module
...
@@ -55,5 +55,10 @@ public class ex_module
/// 只读 0、否 1、是
/// 只读 0、否 1、是
/// </summary>
/// </summary>
public
Nullable
<
int
>
ReadOnly
{
get
;
set
;
}
public
Nullable
<
int
>
ReadOnly
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
CheckScriptId
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/ExConfigService.cs
View file @
e0dc34a8
...
@@ -31,6 +31,8 @@ public class ExConfigService : IAutoInjection
...
@@ -31,6 +31,8 @@ public class ExConfigService : IAutoInjection
private
readonly
PerforModdicRepository
moddicRepository
;
private
readonly
PerforModdicRepository
moddicRepository
;
private
readonly
QueryService
queryService
;
private
readonly
QueryService
queryService
;
private
readonly
ILogger
logger
;
private
readonly
ILogger
logger
;
private
readonly
PerforCofdrugtypeRepository
cofdrugtypeRepository
;
private
readonly
PerforPerdeptdicRepository
perdeptdicRepository
;
public
ExConfigService
(
PerforExtypeRepository
extypeRepository
,
public
ExConfigService
(
PerforExtypeRepository
extypeRepository
,
PerforExscriptRepository
exscriptRepository
,
PerforExscriptRepository
exscriptRepository
,
...
@@ -45,7 +47,9 @@ public class ExConfigService : IAutoInjection
...
@@ -45,7 +47,9 @@ public class ExConfigService : IAutoInjection
PerforExtractRepository
extractRepository
,
PerforExtractRepository
extractRepository
,
PerforModdicRepository
moddicRepository
,
PerforModdicRepository
moddicRepository
,
QueryService
queryService
,
QueryService
queryService
,
ILogger
<
ExConfigService
>
logger
ILogger
<
ExConfigService
>
logger
,
PerforCofdrugtypeRepository
cofdrugtypeRepository
,
PerforPerdeptdicRepository
perdeptdicRepository
)
)
{
{
this
.
extypeRepository
=
extypeRepository
;
this
.
extypeRepository
=
extypeRepository
;
...
@@ -62,6 +66,8 @@ ILogger<ExConfigService> logger
...
@@ -62,6 +66,8 @@ ILogger<ExConfigService> logger
this
.
moddicRepository
=
moddicRepository
;
this
.
moddicRepository
=
moddicRepository
;
this
.
queryService
=
queryService
;
this
.
queryService
=
queryService
;
this
.
logger
=
logger
;
this
.
logger
=
logger
;
this
.
cofdrugtypeRepository
=
cofdrugtypeRepository
;
this
.
perdeptdicRepository
=
perdeptdicRepository
;
}
}
#
region
Modules
#
region
Modules
...
@@ -689,6 +695,8 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
...
@@ -689,6 +695,8 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
public
Dictionary
<
string
,
object
>
CheckHasNewDepartmentOrCategory
(
int
allotId
)
public
Dictionary
<
string
,
object
>
CheckHasNewDepartmentOrCategory
(
int
allotId
)
{
{
#
region
改正
/*
var allot = perallotRepository.GetEntity(t => t.ID == allotId);
var allot = perallotRepository.GetEntity(t => t.ID == allotId);
var allotList = perallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId && new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive }.Contains(t.States));
var allotList = perallotRepository.GetEntities(t => t.HospitalId == allot.HospitalId && new int[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive }.Contains(t.States));
...
@@ -734,8 +742,99 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
...
@@ -734,8 +742,99 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
if (noExistedTypename != null && noExistedTypename.Any())
if (noExistedTypename != null && noExistedTypename.Any())
stringBuilder.AppendLine($"新增费用类型:{string.Join(",", noExistedTypename)}");
stringBuilder.AppendLine($"新增费用类型:{string.Join(",", noExistedTypename)}");
paramtemers
.
Add
(
dic
.
Remark
,
stringBuilder
.
ToString
());
paramtemers.Add(dic.Remark, stringBuilder.ToString());
}
}
return paramtemers; */
#
endregion
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
allotId
);
var
drugTypes
=
cofdrugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
HospitalId
==
allot
.
HospitalId
);
var
deptDic
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
);
var
moduleSheet
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
t
.
SheetType
==
(
int
)
SheetType
.
Income
);
if
(
moduleSheet
==
null
||
!
moduleSheet
.
Any
())
return
null
;
var
moduleScript
=
moduleSheet
.
Select
(
t
=>
t
.
CheckScriptId
);
var
scripts
=
exscriptRepository
.
GetEntities
(
t
=>
moduleScript
.
Contains
(
t
.
Id
));
if
(
scripts
==
null
||
!
scripts
.
Any
())
return
null
;
var
scriptConfig
=
scripts
.
Select
(
t
=>
t
.
ConfigId
);
var
hosConfig
=
hospitalconfigRepository
.
GetEntities
(
t
=>
scriptConfig
.
Contains
(
t
.
Id
));
if
(
hosConfig
==
null
)
return
null
;
Dictionary
<
string
,
object
>
paramtemers
=
new
Dictionary
<
string
,
object
>();
StringBuilder
stringBuilder
=
new
StringBuilder
();
List
<
string
>
deparmants
=
new
List
<
string
>();
List
<
string
>
drugs
=
new
List
<
string
>();
List
<
per_dept_dic
>
deptList
=
new
List
<
per_dept_dic
>();
List
<
cof_drugtype
>
drugTypeList
=
new
List
<
cof_drugtype
>();
string
defaultSource
=
"住院"
,
defauleUnittype
=
UnitType
.
医生组
.
ToString
();
foreach
(
var
scr
in
scripts
)
{
var
conf
=
hosConfig
.
FirstOrDefault
(
t
=>
t
.
Id
==
scr
.
ConfigId
);
if
(
conf
==
null
)
continue
;
var
data
=
queryService
.
QueryData
(
conf
,
allot
,
scr
.
ExecScript
);
if
(
data
==
null
||
!
data
.
Any
())
continue
;
foreach
(
var
module
in
moduleSheet
.
Where
(
t
=>
t
.
CheckScriptId
==
scr
.
Id
))
{
var
noExistedDepartment
=
data
.
Select
(
t
=>
t
.
Department
).
Distinct
().
ToList
();
var
source
=
module
.
ModuleName
.
Contains
(
defaultSource
)
?
"住院"
:
"门诊"
;
if
(
deptDic
!=
null
&&
deptDic
.
Any
(
t
=>
t
.
Source
==
source
))
{
var
deptDics
=
deptDic
.
Where
(
t
=>
t
.
Source
==
source
).
Select
(
t
=>
t
.
HISDeptName
);
noExistedDepartment
=
data
.
Select
(
t
=>
t
.
Department
).
Except
(
deptDics
).
Distinct
().
ToList
();
}
if
(
noExistedDepartment
!=
null
&&
noExistedDepartment
.
Any
())
// 系统科室、标准科室唯一,门诊、住院核算单元可能不一致,因此数据可重复
{
var
dept
=
noExistedDepartment
.
Select
(
t
=>
new
per_dept_dic
{
HISDeptName
=
t
,
UnitType
=
defauleUnittype
,
Source
=
source
,
HospitalId
=
allot
.
HospitalId
,
IsVerify
=
0
,
VerifyMessage
=
"抽取前科室校验后补增科室"
,
CreateUser
=
1
}).
ToList
();
deparmants
.
AddRange
(
noExistedDepartment
.
Where
(
t
=>
!
deparmants
.
Contains
(
t
)));
deptList
.
AddRange
(
dept
);
}
}
var
typeNames
=
drugTypes
.
Select
(
t
=>
t
.
Charge
).
Distinct
();
var
noExistedTypename
=
data
.
Select
(
t
=>
t
.
Category
).
Distinct
().
Except
(
typeNames
);
if
(
noExistedTypename
!=
null
&&
noExistedTypename
.
Any
(
t
=>
!
drugs
.
Contains
(
t
)))
{
var
drugType
=
noExistedTypename
.
Where
(
t
=>
!
drugs
.
Contains
(
t
)).
Select
(
t
=>
new
cof_drugtype
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
}).
ToList
();
drugs
.
AddRange
(
noExistedTypename
.
Where
(
t
=>
!
drugs
.
Contains
(
t
)));
drugTypeList
.
AddRange
(
drugType
);
}
}
if
(
deparmants
!=
null
&&
deparmants
.
Any
())
{
var
distinctedDept
=
deptList
.
ToDistinct
().
ToList
();
distinctedDept
.
ForEach
(
t
=>
t
.
CreateTime
=
DateTime
.
Now
);
//在去重前添加时间,可能造成时间不一致,无法去重
perdeptdicRepository
.
AddRange
(
distinctedDept
.
ToArray
());
stringBuilder
.
AppendLine
(
$"新增科室:
{
string
.
Join
(
","
,
deparmants
.
Distinct
())}
"
);
}
if
(
drugs
!=
null
&&
drugs
.
Any
())
{
cofdrugtypeRepository
.
AddRange
(
drugTypeList
.
ToDistinct
().
ToArray
());
stringBuilder
.
AppendLine
(
$"新增费用类型:
{
string
.
Join
(
","
,
drugs
.
Distinct
())}
"
);
}
paramtemers
.
Add
(
"新增科室或费用类型"
,
stringBuilder
.
ToString
());
return
paramtemers
;
return
paramtemers
;
}
}
...
...
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