FHIR Chat · Working commit of Delphi-FHIRServer · pascal

Stream: pascal

Topic: Working commit of Delphi-FHIRServer


view this post on Zulip Vitaly Popov (Jan 06 2019 at 17:59):

Hi all! I'm trying to compile Delphi FHIRServer project, but I can't. Can anybody prompt the version of last working commit? I tried several of last but failed. For example for commit c91167e I've got next errors:
64bit:
pasted image
32bit:
pasted image

And also, does any docs exist for Delphi implementation?

view this post on Zulip Vitaly Popov (Jan 07 2019 at 17:54):

Ok, today's commit (e2eb921) with last markdown commit (d257239) seems to be comiplable (at least 64bit). Thanks!

Another problem, which I want to overcome from the end of 2018, is that I can't install R2 and R3 resources. Only R4 installation works fine.
I used commands, like this:
fhirserver -cmd remount -installer -password "masterkey" -ini "C:\program files\fhirserver\fhirserver.ini" -packages ,hl7.fhir.core#1.0.2,fhir.tx.support#1.0.2 -endpoint r2 -mode open
fhirserver -cmd remount -installer -password "masterkey" -ini "C:\program files\fhirserver\fhirserver.ini" -packages ,hl7.fhir.core#3.0.1,fhir.tx.support#3.0.1 -endpoint r3 -mode open
fhirserver -cmd remount -installer -password "masterkey" -ini "C:\program files\fhirserver\fhirserver.ini" -packages ,hl7.fhir.core#4.0.0,fhir.tx.support#4.0.0 -endpoint r4 -mode open
R2 Error: pasted image
R3 Error: pasted image
I use fresh packages: pasted image
The same errors I've got before while trying to install it through released FHIRServer installation (http://www.healthintersections.com.au/FhirServer/ - page btw seems to be broken now).
R2 Error: r2.png
R3 Error: r3.png

What can be wrong?

The only DBMS, which worked for me, is MS SQL Server 2017 Developer (I failed many times with different versions of MySQL and MariaDB, MS SQL Server 2017 Express didn't work either)

view this post on Zulip Grahame Grieve (Jan 08 2019 at 19:20):

sorry - catching up here now.

view this post on Zulip Grahame Grieve (Jan 08 2019 at 19:22):

what error messages do you get with other databases?

view this post on Zulip Grahame Grieve (Jan 08 2019 at 19:22):

I can't test them right now - mysql ODBC driver won't load on my system - some dll linking error

view this post on Zulip Vitaly Popov (Jan 08 2019 at 19:41):

I don't have any of MySQL-software installed now, so I can't show screens of errors. There were errors about something concerning packet sizes, as I remember. I suppose @Husin Alkatiri can tell more about MySQL-problems.
But the main our problem now is concerning R2 and R3 resources installation - I've posted screens of errors before

view this post on Zulip Grahame Grieve (Jan 08 2019 at 19:55):

yes I saw them. I'll look into it when I get a chance. It worked for me last time I tried it.. :-(

view this post on Zulip Vitaly Popov (Jan 08 2019 at 19:58):

Thank you! ;) We'll wait

view this post on Zulip Husin Alkatiri (Jan 09 2019 at 07:50):

MyFHIR4.png

this is the error when install resource for FHIR4 in mySQL.

i do this with my.ini setting was updated to

max_allowed_packet = 320M
innodb_buffer_pool_size = 1280M
innodb_log_file_size = 320M
innodb_log_buffer_size = 32M
collation-server = utf8_general_ci

with default setting it will throw another error before "##> 64 Process hl7.fhir.core#4.0.0 Condition/f202"
so i made that change in my.ini but stuck on this error.
i was try to debug the source 1 by 1 bot not get the point of error yet.

if you need the screenshot of error that triggered on default setting of mysql (my.ini) then i will try to set the my.ini the process again.

thanks.

view this post on Zulip Jose Costa Teixeira (Jan 09 2019 at 11:22):

query_cache_size = 64M
query_cache_min_res_unit =2
tmp_table_size = 128M
max_heap_table_size = 128M
skip-name-resolve
innodb_file_per_table = 1
innodb_buffer_pool_size = 1280M
innodb_flush_log_at_trx_commit = 2
lower_case_table_names = 1
innodb_flush_method=O_DIRECT
max_binlog_size = 100M
expire_logs_days=2
innodb_ft_min_token_size=1
ft_min_word_len=2
autocommit=1
connect_timeout=120
long_query_time=60

character-set-server = utf8
collation-server = utf8_general_ci

max_allowed_packet = 32M

view this post on Zulip Jose Costa Teixeira (Jan 09 2019 at 11:23):

this is part of my.ini that works (well at least worked last time i tried it)

view this post on Zulip Jose Costa Teixeira (Jan 09 2019 at 11:23):

mysql had issues with utf8 until recently, so i had to use utf8 or utf8mb4

view this post on Zulip Jose Costa Teixeira (Jan 09 2019 at 11:23):

and i also have a .bat to create the database making the charset explicit

view this post on Zulip Jose Costa Teixeira (Jan 09 2019 at 11:24):

mysql -u root -p -e "DROP DATABASE fhirDB;"
mysql -u root -p -e "CREATE DATABASE fhirDB CHARACTER SET utf8 COLLATE utf8_unicode_ci;"
mysql -u root -p -e "CREATE USER 'sa'@'%' IDENTIFIED BY 'mypassword';"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON . TO 'sa'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;"

view this post on Zulip Grahame Grieve (Jan 10 2019 at 10:11):

access violation is a pascal error, not a mysql error

view this post on Zulip Vitaly Popov (Jan 13 2019 at 04:50):

R3 installation works well with last commit (8e902aa). Thanks!
Unfortunately, with R2 installation I've got another error: pasted image

view this post on Zulip Husin Alkatiri (Jan 13 2019 at 15:42):

install R3 now success from compiled source (8e902aa)

view this post on Zulip Husin Alkatiri (Jan 13 2019 at 18:07):

i found a message related FullText Search for MS SQL when run FHIR Server install in debug

FullTextErr1.png

is FullTextSearch for MS SQL is required or preferred ?

view this post on Zulip Grahame Grieve (Jan 13 2019 at 19:04):

preferred

view this post on Zulip Husin Alkatiri (Jan 13 2019 at 20:40):

the FHIR VCL Demo throw this error

DemoErr.png

view this post on Zulip Grahame Grieve (Jan 13 2019 at 21:00):

you ran it against an R3 interface. The Vcl Demo is R2 specific

view this post on Zulip Husin Alkatiri (Jan 13 2019 at 21:07):

ahh ... i am sorry, just remeber that it's for R2 ... my head full of everything so loose concentration

view this post on Zulip Grahame Grieve (Jan 13 2019 at 21:08):

no problems

view this post on Zulip Jose Costa Teixeira (Jan 13 2019 at 22:24):

Mine is complaining about
[dcc64 Fatal Error] FHIR.Support.MXml.pas(41): F1026 File not found: '..\..\markdown\source\MarkdownHTMLEntities.pas'

view this post on Zulip Vitaly Popov (Jan 13 2019 at 22:28):

I suppose you need to update markdown project. This file was added to it recently

view this post on Zulip Grahame Grieve (Jan 13 2019 at 23:45):

yes

view this post on Zulip Grahame Grieve (Jan 13 2019 at 23:46):

I did commonmark support

view this post on Zulip Vitaly Popov (Jan 14 2019 at 04:50):

All (R2/R3/R4) resources installation went smooth with c31b26a commit! At least with MS SQL Server 2017 Developer.
But we still have a problem with R2 configuration server start: pasted image
R3 and R4 starting fine

view this post on Zulip Grahame Grieve (Jan 16 2019 at 11:54):

that's not related to R2. When did it happen?

view this post on Zulip Husin Alkatiri (Jan 16 2019 at 11:56):

when run server using FHIRServer.exe -debug -ini c:\FHIR\fhirserver.ini << when the R2 commented on FHIR.ini it's not happen ... only happen when R2 not commented ... R3 and R4 is work fine

view this post on Zulip Husin Alkatiri (Jan 16 2019 at 12:29):

R2Error.png

this is the clear result ... i run the exe from compiled source from latest release (not current that updated about 20 mins ago)

view this post on Zulip Grahame Grieve (Jan 16 2019 at 13:32):

what had happened when running this beforehand?

view this post on Zulip Grahame Grieve (Jan 16 2019 at 13:32):

has it just been installed? or did it get used?

view this post on Zulip Husin Alkatiri (Jan 16 2019 at 13:33):

it was installed nicely... i will try install R2 again from Blank DB now ... will let you know the result soon

view this post on Zulip Husin Alkatiri (Jan 16 2019 at 13:34):

anyway R2 cannot installed before until last commit that committed few days ago that resulting this error when run

view this post on Zulip Grahame Grieve (Jan 16 2019 at 13:57):

yes should be ok now

view this post on Zulip Husin Alkatiri (Jan 16 2019 at 15:01):

i just download the lates commit (c90b6af) ... compile it and its installed nicely with a new blank R2 DB ...

but it's still trigger same error when run Server ...

R2Error.png

view this post on Zulip Grahame Grieve (Jan 16 2019 at 22:57):

hah. found it - thanks. committed a fix

view this post on Zulip Husin Alkatiri (Jan 16 2019 at 22:57):

Thank you very much ... will try it soon

view this post on Zulip Vitaly Popov (Jan 17 2019 at 00:21):

I can confirm, that everything works fine, now ;) Thank you very much!
commit aaef6cbabd26c3710b902f462fa381f6f3d95cd4 [aaef6cb] MS SQL Server 2017 Developer

view this post on Zulip Grahame Grieve (Jan 17 2019 at 13:26):

great

view this post on Zulip Husin Alkatiri (Jan 21 2019 at 22:15):

@Grahame Grieve is there any documentation about how to setup user in server for OAuth (CleintID, ClientSecret, Scope etc) ?

view this post on Zulip Husin Alkatiri (Jan 22 2019 at 14:28):

this sql statement looks incomplete to me ... always trigger error.

RecordOAuth.png

view this post on Zulip Grahame Grieve (Jan 22 2019 at 20:44):

no doco. It's done through the UI - log in using the administrator account details and then choose to register an application. Or it can done using a web interface on the register client end-point

view this post on Zulip Grahame Grieve (Jan 22 2019 at 20:45):

agree that the sql statement could never work... I will investigate

view this post on Zulip Husin Alkatiri (Jan 23 2019 at 06:39):

no doco. It's done through the UI - log in using the administrator account details and then choose to register an application. Or it can done using a web interface on the register client end-point

not sure which UI to use for register an application ? on Server app, Toolkit or other

view this post on Zulip Grahame Grieve (Jan 23 2019 at 12:03):

in that sentence, UI = web user interface

view this post on Zulip Husin Alkatiri (Jan 26 2019 at 21:22):

when try to login via web base it's always return this error ... either on my local or on test.fhir.org/r3

OAuthLogin.png
anybody know what's going on in this ?

view this post on Zulip Husin Alkatiri (Jan 29 2019 at 07:25):

@Grahame Grieve i can do login on my FHIR Server now and work on Auth (HTTPS) ... but i have a thing that looks strange to me ...
after client login with TSmartOnFhirLoginForm or TSmartAppLaunchLogin it's allways directs to this Auth_Choice page ...
so far i debug the server and not get the way to directly get token instead to that choice page ...

is that Auth_Choice will allways show up ?

AuthChoice.png

view this post on Zulip Grahame Grieve (Jan 29 2019 at 07:48):

yes it will always show up on the server

view this post on Zulip Grahame Grieve (Jan 29 2019 at 07:48):

part of smart-app-launch requirements

view this post on Zulip Husin Alkatiri (Jan 29 2019 at 09:30):

@Grahame Grieve

this getcookiesindex always return -1 when i try login from IE or Edge ... but it's works fine when i login from FireFox...
that's make the Session not recognized because SessionManager.GetSession not executed and cannot pass to Auth_Choice in IE and Edge
resulting on "User Session Not Found"

nb: it will make the client with TSmartOnFhirLoginForm not work too since it's use TWebBrowser that absed on IE.

CookiesNotfound.png

view this post on Zulip Grahame Grieve (Jan 29 2019 at 10:05):

can you provide more inforamtion - what's failing? (and I wonder why, since I always used TWebBrowser)

view this post on Zulip Husin Alkatiri (Jan 29 2019 at 10:39):

the failing is after login on browser the code will goes to SecureRequest request procedure

when executing this "c := request.Cookies.GetCookieIndex(FHIR_COOKIE_NAME);" on Secure Request procedure then it will:

C will set to 0 when use firefox ... mean the GetCookieIndex found the cookies ...

but when i use IE or Edge it will resulting -1 that mean not found the cookie and will not execute
FContext.SessionManager.GetSession(request.Cookies[c].CookieText.Substring(FHIR_COOKIE_NAME.Length + 1), Session, check);
that will resulting Session = nil on next process (HandleChoice procedure on FHIR.Server.AuthMgr) ...
then will goes to trigger:
if session = nil then
raise EFHIRException.create('User Session not found');

view this post on Zulip Husin Alkatiri (Jan 29 2019 at 11:05):

btw, nevermind, i think it's IE or EDGE problem... since it's work on Chrome and Firefox


Last updated: Apr 12 2022 at 19:14 UTC