go to post Guillaume Rongier · Jun 13, 2023 What a neat article, very useful and with a lot of details. Thanks :)
go to post Guillaume Rongier · Jun 12, 2023 Hi, Do you know that every component in a production has a OnInit() method that is called when the component starts? You can use this method to set the value of the parameter. For example: Method OnInit() As %Status { Set ..#Token = $System.Util.GetEnviron("Token") Quit $$$OK } May be it's more elegant to do so than update the parameter in the Production file. FYI, that what i do in IOP (Interoperability On Python) to set the value of the parameter of any component in a production. def on_init(self): self.my_param = os.environ.get("MY_PARAM", "default_value")
go to post Guillaume Rongier · Jun 7, 2023 Good idea, it environment variable is not found switch to settings value.
go to post Guillaume Rongier · Jun 5, 2023 Hi Evegny, You can do it in the following way: * in the production settings, with DefaultSettings docs here * but default settings is a kind of replacement for environment variables * you can to it in the code : * ObjectScript: $system.Util.GetEnviron("MY_ENV_VAR") * Python: os.environ['MY_ENV_VAR'] * you can use iop (interoperabilty on python) to import production in python way : settings.py import os PRODUCTIONS = [ { 'shvarov.i14y.Production': { "Item": [ { "@Name": "shvarov.i14y.ChatOperation", "@ClassName": "Telegram.BusinessOperation", "@Category": "Reddit", "@PoolSize": "1", "@Enabled": "true", "@Foreground": "false", "@Comment": "", "@LogTraceEvents": "false", "@Schedule": "", "Setting": [ { "@Target": "Adapter", "@Name": "SSLConfig", "#text": "default" }, { "@Target": "Adapter", "@Name": "Token", "#text": os.environ['TELEGRAM_TOKEN'] } ] } ] } } ] and then in the terminal: $ iop -M settings.py More information about iop and settings.py here
go to post Guillaume Rongier · Jun 4, 2023 Hi Evgeny, Thanks for your feedback. The -x option is for status, because -s is already used to start a production. The -e option is for export, and the export can be imported with the -m option. -m option stand for migrate, because I took the inspiration from the migrate command form django. I hope it's more clear now. But if you think, -i for import and -e for export is more clear, I can change it. Same for -s and -x. What do you think can be short for status?
go to post Guillaume Rongier · Apr 19, 2023 Awesome, how do you position this tool compared to irissqlcli if it had a web version?
go to post Guillaume Rongier · Apr 18, 2023 I love it <3, for the more you are using the community driver DB-API :)
go to post Guillaume Rongier · Apr 14, 2023 Wow, what a useful thread! Thank you. I especially like the fact that you offer solution in each IRIS language : SQL, Python, ObjectScript.
go to post Guillaume Rongier · Apr 3, 2023 SELECT {fn WEEK('2004-02-25')} AS Week, {fn DAY('2004-02-25')} as Day,{fn DAYOFWEEK('2004-02-25')} as DayOfWeek,{fn Year('2004-02-25')} as Year,{fn Quarter('2004-02-25')} as Quarter,{fn DAYOFYEAR('2004-02-25')} as DayOfYear Doc : https://docs.intersystems.com/iris20223/csp/documatic/%25CSP.Documatic.c... not all your requirements but it's a start
go to post Guillaume Rongier · Mar 29, 2023 Another good way is to set the header : Prefer: return=representation The payload will be sent you back with the id. Example : POST http://localhost:33783/fhir/r4/Patient HTTP/1.1 Content-Type: application/json+fhir Accept: application/json+fhir Prefer: return=representation { "resourceType": "Patient", "active": true, "name": [ { "use": "official", "family": "Donald", "given": [ "Duck" ] } ] } Response : HTTP/1.1 201 Created Date: Wed, 29 Mar 2023 12:13:40 GMT Server: Apache CACHE-CONTROL: no-cache ETAG: W/"1" EXPIRES: Thu, 29 Oct 1998 17:04:19 GMT LAST-MODIFIED: Wed, 29 Mar 2023 12:13:40 GMT LOCATION: http://localhost:33783/fhir/r4/Patient/2011/_history/1 PRAGMA: no-cache CONTENT-LENGTH: 177 Connection: close Content-Type: application/fhir+json; charset=UTF-8 { "resourceType": "Patient", "active": true, "name": [ { "use": "official", "family": "Donald", "given": [ "Duck" ] } ], "id": "2011", "meta": { "lastUpdated": "2023-03-29T12:13:40Z", "versionId": "1" } }
go to post Guillaume Rongier · Mar 21, 2023 Great article, if your are looking for an approach without objectscript and making use of "irispyhton", check this code : python code : import pandas as pd from sqlalchemy import create_engine,types engine = create_engine('iris+emb:///') df = pd.read_csv("/irisdev/app/notebook/Notebooks/date_panda.csv") # change type of FullDate to date df['FullDate'] = pd.to_datetime(df['FullDate']) df.head() df.to_sql('DateFact', engine, schema="Demo" ,if_exists='replace', index=True, dtype={'DayName': types.VARCHAR(50), 'FullDate': types.DATE, 'MonthName': types.VARCHAR(50), 'MonthYear': types.INTEGER, 'Year': types.INTEGER}) requirements.txt : pandas sqlalchemy==1.4.22 sqlalchemy-iris==0.5.0 irissqlcli date_panda.csv ID,DayName,FullDate,MonthName,MonthYear,Year 1,Monday,1900-01-01,January,190001,1900 2,Tuesday,1900-01-02,January,190001,1900 3,Wednesday,1900-01-03,January,190001,1900 4,Thursday,1900-01-04,January,190001,1900 5,Friday,1900-01-05,January,190001,1900 6,Saturday,1900-01-06,January,190001,1900 7,Sunday,1900-01-07,January,190001,1900 8,Monday,1900-01-08,January,190001,1900 9,Tuesday,1900-01-09,January,190001,1900
go to post Guillaume Rongier · Mar 17, 2023 nc -z -v localhost 1972 Use netcat, it will tell you if the port is open, if not then it's may be because superserver is not ready
go to post Guillaume Rongier · Mar 13, 2023 Thank for the feedback. I think I will continue to use my sunglasses to check the community at night for a while
go to post Guillaume Rongier · Mar 10, 2023 Hi @Raj Singh , it does support float even is the readme is not up to date. If you are looking for an objectscript / embedded python approach Alex Woodhead solution will fit you well. If you are looking for an python only approach my module may help you.
go to post Guillaume Rongier · Mar 9, 2023 You are welcome. And I'm very happy that you find this trick useful. :)
go to post Guillaume Rongier · Mar 2, 2023 have you tired this python module ? pip3 install iris-dollar-list it can convert $list to python list.
go to post Guillaume Rongier · Feb 23, 2023 Sure you can, for example to retrieve all the patient with an observation based on the code : 8302-2 [FHIR EndPoint]/Patient?_has:Observation:patient:code=8302-2 More info here : https://www.hl7.org/fhir/search.html#has For the python part have a look at this git : https://github.com/LucasEnard/fhir-client-python It's a simple example how to use python client to interact with a FHIR server. For fhir-py to create the same query use raw search : https://github.com/grongierisc/fhir-py#raw-parameters Last but not least, check out our neat implementation of SQL On FHIR aka FHIR SQL Builder Demo here : https://github.com/grongierisc/iris-fhirsqlbuilder
go to post Guillaume Rongier · Feb 13, 2023 How to setup a secure connection : Generate a key pair : openssl req -x509 -nodes -days 1 -newkey rsa:2048 -subj /CN=* -keyout /irisdev/app/server.key -out /irisdev/app/server.crt Configure IRIS super server with SSL/TLS : https://docs.intersystems.com/iris20223/csp/docbook/Doc.View.cls?KEY=GTL... Use certificate to connect : python3 -m irissqlcli iris://SuperUser:SYS@localhost:33782/USER -c server.crt
go to post Guillaume Rongier · Feb 13, 2023 If I understand correctly, the trick is to load the "src/gbl/SYS.xml" file that holds the configuration of git-source-control module. If we create a new file like a BP or a DTL, we still have to add it to the source control module with the UI. Then, if we do so, we have to update the "src/gbl/SYS.xml" file with the new file. Am I right ?
go to post Guillaume Rongier · Feb 13, 2023 Great post thanks. If you want to go further check this git : https://github.com/grongierisc/kong-ee-training