Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
HIMSScannerService
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HIMSScanner
HIMSScannerService
Commits
6e5e5a38
Commit
6e5e5a38
authored
Dec 07, 2024
by
Krishna Reddy Tamatam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ConfigValues method
parent
18ca23ec
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
3 deletions
+73
-3
FTPManagementAPIController.cs
Controllers/FTPManagementAPIController.cs
+18
-1
AppSettings.cs
Models/AppSettings.cs
+2
-0
FTPInfo.cs
Models/FTPInfo.cs
+24
-0
Program.cs
Program.cs
+1
-0
FTPDataAdapter.cs
Services/FTPDataAdapter.cs
+27
-2
appsettings.json
appsettings.json
+1
-0
No files found.
Controllers/FTPManagementAPIController.cs
View file @
6e5e5a38
...
...
@@ -134,7 +134,6 @@ namespace FTP_Services.Services.Controllers
}
}
[
HttpGet
(
"LoadDocumentCategories"
)]
public
IActionResult
LoadDocumentCategories
()
{
...
...
@@ -152,6 +151,24 @@ namespace FTP_Services.Services.Controllers
}
}
[
HttpGet
(
"GetConfigValues"
)]
public
IActionResult
GetConfigValues
()
{
log
.
Debug
(
"GetConfigValues ==> "
);
try
{
_appSettings
.
ConnectionString
=
_appSettings
.
AdminConnectionString
;
FTPDataAdapter
adapter
=
new
FTPDataAdapter
(
_appSettings
);
List
<
ConfigValues
>?
RequestsList
=
adapter
.
ConfigValues
();
return
Ok
(
RequestsList
);
}
catch
(
Exception
ex
)
{
log
.
Error
(
"Fail to get data for GetConfigValues - Error:"
+
ex
.
Message
);
return
NotFound
(
"No results"
);
}
}
[
HttpGet
(
"GetSpecialities"
)]
public
IActionResult
GetSpecialities
()
{
...
...
Models/AppSettings.cs
View file @
6e5e5a38
...
...
@@ -3,10 +3,12 @@ namespace FTP_Services.Core.Models
public
class
AppSettings
{
public
string
ConnectionString
{
get
;
set
;
}
public
string
AdminConnectionString
{
get
;
set
;
}
public
AppSettings
()
{
ConnectionString
=
""
;
AdminConnectionString
=
""
;
}
public
FTPConfiguration
FTPConfiguration
{
get
;
set
;
}
...
...
Models/FTPInfo.cs
View file @
6e5e5a38
...
...
@@ -139,6 +139,30 @@ namespace FTP_Services.Core.Models
Name
=
""
;
}
}
public
class
ConfigValues
{
public
int
ID
{
get
;
set
;
}
public
string
Environment
{
get
;
set
;
}
public
string
RemotePath
{
get
;
set
;
}
public
string
CompanyName
{
get
;
set
;
}
public
string
FTPServiceURL
{
get
;
set
;
}
public
int
DPI
{
get
;
set
;
}
public
int
PDFSizeLimit
{
get
;
set
;
}
public
bool
IsActive
{
get
;
set
;
}
public
ConfigValues
()
{
ID
=
-
1
;
Environment
=
""
;
RemotePath
=
""
;
CompanyName
=
""
;
FTPServiceURL
=
""
;
DPI
=
100
;
PDFSizeLimit
=
20
;
IsActive
=
true
;
}
}
public
class
PatientDocuments
{
...
...
Program.cs
View file @
6e5e5a38
...
...
@@ -147,6 +147,7 @@ if (app.Environment.IsDevelopment())
}
else
{
//app.Run();
app
.
Run
(
"http://*:4708"
);
}
Services/FTPDataAdapter.cs
View file @
6e5e5a38
...
...
@@ -130,6 +130,31 @@ namespace FTP_Services.Services
return
null
;
}
}
public
List
<
ConfigValues
>?
ConfigValues
()
{
List
<
ConfigValues
>?
ConfigValuesData
=
null
;
try
{
using
(
var
tx
=
_repository
.
GetTransaction
())
{
ConfigValuesData
=
_repository
.
Fetch
<
ConfigValues
>(
"SELECT \"ID\", \"Environment\", \"RemotePath\", \"CompanyName\", \"FTPServiceURL\", \"DPI\", \"PDFSizeLimit\", \"DefaultDocType\", \"IsActive\" "
+
"FROM \"ScanConfigMaster\" "
+
"WHERE \"IsActive\" = TRUE "
+
"ORDER BY \"CompanyName\""
);
GC
.
Collect
();
tx
.
Complete
();
}
return
ConfigValuesData
;
}
catch
(
Exception
ex
)
{
log
.
Error
(
"ConfigValues->Failed to get info from db - "
+
ex
.
Message
);
return
null
;
}
}
public
List
<
Specialities
>?
Specialities
()
{
...
...
@@ -191,10 +216,10 @@ namespace FTP_Services.Services
+
SndPatDocRec
.
PatDocId
+
",'"
+
SndPatDocRec
.
UploadedDate
+
"',"
+
"',"
+
SndPatDocRec
.
PatientId
+
",'"
+
SndPatDocRec
.
UploadedBy
+
SndPatDocRec
.
UploadedBy
+
"','"
+
SndPatDocRec
.
DocumentName
+
"','"
...
...
appsettings.json
View file @
6e5e5a38
{
"AppSettings"
:
{
"ConnectionString"
:
"SERVER=192.168.7.207;PORT=5432;UID=ff4dbuser;PWD=dbuser4ff123!;Database=fernandez_uat_20240913;Timeout=1000"
,
"AdminConnectionString"
:
"SERVER=10.11.12.106;PORT=5432;UID=himsdbuser;PWD=dbuser@hims123!;database=CareaxesAdmin;Timeout=1000"
,
"FTPConfiguration"
:
{
"Username"
:
"fernandez"
,
"Password"
:
"fernandez123!"
,
...
...
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