Search

Clear filter
Announcement
Evgeny Shvarov · Mar 22, 2020

Voting in InterSystems IRIS Online Programming Contest!

Hi Community! The registration phase for InterSystems Online Programming Contest ends today and we will start the voting week! Now we have 20 applications - so you have a set of applications to choose from! How to vote? This is easy: you will have one vote, and your vote goes either in Experts nomination or in Community nomination. Experts Nomination If you are InterSystems Product Manager, or DC moderator, or Global Master from Expert level end above - your vote goes for Experts nomination. Community Nomination If you ever contributed to DC (posts or replies) and this was not considered as spam you are able to vote for the applications in Community nomination. Voting Voting takes place on Open Exchange Contest page and you need to sign in to Open Exchange - you can do it with your DC account credentials. If you changed your mind, cancel the choice and give your vote to another application - you have 7 days to choose. Contest participants are allowed to fix the bugs and make improvements to their applications during the voting week, so don't miss and subscribe to application releases! How to test According to the requirements, developers should use Docker version of InterSystems IRIS Community edition or InterSystems IRIS Community Edition for Health. So every solution could be launched as: $ git clone https://github.com/repository $ cd repository $ docker-compose up -d $ docker-compose exec iris iris session iris And then you'll see the IRIS Terminal where you can follow the application instruction to test its functionality. Winner criteriaChoose the application you like most. But the general criteria are: Idea and value - the app makes the world a better place or makes the life of a developer better at least; Functionality and usability - how well and how much the application/library does; The beauty of code - has a readable and qualitative ObjectScript code. Give the vote to the best solution on InterSystems IRIS! You decide! How to test According to the requirements, developers should use Docker version of InterSystems IRIS Community edition or InterSystems IRIS Community Edition for Health. So every solution could be launched as: $ git clone https://github.com/repository $ cd repository $ docker-compose up -d $ docker-compose exec iris iris session iris And then you'll see the IRIS Terminal where you can follow the application instruction to test its functionality. Winner criteriaChoose the application you like most. But the general criteria are: Idea and value - the app makes the world a better place or makes the life of a developer better at least; Functionality and usability - how well and how much the application/library does; The beauty of code - has a readable and qualitative ObjectScript code. The post is updated accordingly. Ok! After the first day of the voting we have: Expert Nomination, Top 3 BlocksExplorer - 2 IDP DV - 1 sql-builder - 1 ______________ The leaderboard. Community Nomination, Top 3 sql-builder - 6 isc-generate-db - 4 declarative-objectscript - 3 ______________ The leaderboard. Developers! Support the applications you like! Participants! Improve and promote your solutions! Hey Developers, Here are the results after 2 days of voting: Expert Nomination, Top 3 BlocksExplorer - 2 ISC DEV - 2 IDP DV - 1 ➡️ The leaderboard. Community Nomination, Top 3 sql-builder - 6 isc-generate-db - 5 BlocksExplorer - 4 ➡️ The leaderboard. So, the voting continues! Full speed ahead! Voting for the IRIS Programming Contest goes ahead! And here're the results at the moment: Expert Nomination, Top 3 BlocksExplorer - 4 sql-builder - 3 isc-utils - 3 ➡️ The leaderboard. Community Nomination, Top 3 sql-builder - 9 isc-generate-db - 6 BlocksExplorer - 5 ➡️ The leaderboard. Who will lead tomorrow? Make your bets! Hey Developers! 3 days left before the end of voting! Please check out the Contest Board and vote for the applications you like! 👍🏼 Please check out today's voting results: Expert Nomination, Top 3 BlocksExplorer - 4 sql-builder - 3 isc-utils - 3 ➡️ The leaderboard. Community Nomination, Top 3 sql-builder - 10 BlocksExplorer - 6 isc-generate-db - 6 ➡️ The leaderboard. Support the best apps with your votes! Happy weekends! Hi Developers! And this is the last day fo Voting in InterSystems Online Contest before we know the names of the winners! Please check out today's voting results: Expert Nomination, Top 3 ISC DEV - 8 BlocksExplorer - 7 isc-utils - 7 ➡️ The leaderboard. Community Nomination, Top 3 sql-builder - 10 BlocksExplorer - 10 isc-generate-db - 6 ➡️ The leaderboard. Make your choice!
Announcement
Anastasia Dyubaylo · Jun 2, 2020

InterSystems Developer Survey: Your Opinion Matters!

Hey Everyone! At InterSystems, the developer community is an integral part of our ecosystem and this role is pivotal in the development of our products and services. As a result, we wanted to undertake market research in recognition of this to discover how best businesses can support developers. We have already asked 300 developers their thoughts, but we wanted to extend this survey to reach more people and also get your views on the current climate as we have all had to adapt our working environments. ➡️ Please click this link to take part in our survey! Note: The survey will take less than 5 minutes to complete. Come on! COS what else ? Hey developers, We want to hear from you! What resources do you use to help you in your developments/app builds? ✅ Please take part in our 5-min survey.
Article
Yuri Marx Pereira Gomes · Jun 3, 2020

Integrate SAP and InterSystems IRIS using OData

SAP offers a broad support to OData in all your products. So, OData can be an excellent option to exchange data between SAP and InterSystems IRIS. Follow the instructions in the article https://community.intersystems.com/post/odata-and-intersystems-iris to expose your IRIS data as REST OData services. To consume InterSystems IRIS data from SAP using OData, follow these steps (credits to the next steps of this tutorial: https://sapyard.com/sapui5-for-abapers-consuming-odata-service-from-sapui5-application-crud-operations/) : Create a new SAPUI5 application by the name crud_demo. Create a XML view ‘crud_demo.view’. Write below code in it. <core:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m" controllerName="crud_demo.crud_demo" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:l="sap.ui.commons.layout"> <Page title="CRUD Operations"> <content> <l:AbsoluteLayout width="10rem" height="10rem"></l:AbsoluteLayout> <VBox xmlns="sap.m" id="vboxid"> <items> <HBox xmlns="sap.m"> <items> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Button xmlns="sap.m" id="cbtn" press="oDataCall" text="Create"></Button> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Button xmlns="sap.m" id="rbtn" press="oDataCall" text="Read"></Button> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Button xmlns="sap.m" id="ubtn" press="oDataCall" text="Update"></Button> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Button xmlns="sap.m" id="dbtn" press="oDataCall" text="Delete"></Button> </items> </HBox> <HBox xmlns="sap.m"> <items> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Input xmlns="sap.m" id="uniqueid" placeholder="ID" value="1"></Input> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Input xmlns="sap.m" id="nameid" placeholder="Name" value="test"></Input> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Input xmlns="sap.m" id="emailid" placeholder="Email" value="test@gmail.com"></Input> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Input xmlns="sap.m" id="mobid" placeholder="Mobile" value="8888888888"></Input> </items> </HBox> <HBox xmlns="sap.m"> <items> <l:AbsoluteLayout width="20px" height="20px"></l:AbsoluteLayout> <Table xmlns="sap.m" id="userdatatable" headerText="User Data"> <items> <ListItemBase xmlns="sap.m" id="id1"></ListItemBase> </items> <columns> <!-- sap.m.Column --> <Column xmlns="sap.m"> <header> <Text xmlns="sap.m" text="Id" ></Text></header></Column> <Column xmlns="sap.m"> <header> <Text xmlns="sap.m" text="Name" ></Text></header></Column> <Column xmlns="sap.m"> <header> <Text xmlns="sap.m" text="Email" ></Text></header></Column> <Column xmlns="sap.m"> <header> <Text xmlns="sap.m" text="Mobile" ></Text></header></Column> </columns> </Table> </items> </HBox> </items> <!-- sap.ui.core.Control --> </VBox> </content> </Page> </core:View> Create crud_demo.controller.js. Write below code in it. onInit: function() { that = this; // Create Model Instance of the oData service var oModel = new sap.ui.model.odata.v2.ODataModel("/sap/opu/odata/sap/ZCRUD_DEMO_SRV"); sap.ui.getCore().setModel(oModel, "myModel"); }, oDataCall:function(oEvent) { // call oData service's function based on which button is clicked. debugger; var myModel = sap.ui.getCore().getModel("myModel"); myModel.setHeaders({ "X-Requested-With" : "X" }); // CREATE****************** if ('Create' == oEvent.oSource.mProperties.text) { var obj = {}; obj.id = that.getView().byId("uniqueid").getValue(); obj.name = that.getView().byId("nameid").getValue(); obj.email = that.getView().byId("emailid").getValue(); obj.mobile = that.getView().byId("mobid").getValue(); myModel.create('/userdataSet', obj, { success : function(oData, oResponse) { debugger; alert('Record Created Successfully...'); }, error : function(err, oResponse) { debugger; alert('Error while creating record - ' .concat(err.response.statusText)); } }); } // READ****************** else if ('Read' == oEvent.oSource.mProperties.text) { var readurl = "/userdataSet?$filter=(id eq '')"; myModel.read(readurl, { success : function(oData, oResponse) { debugger; var userdata = new sap.ui.model.json.JSONModel({ "Result" : oData.results }); var tab = that.getView().byId("userdatatable"); tab.setModel(userdata); var i = 0; tab.bindAggregation("items", { path : "/Result", template : new sap.m.ColumnListItem({ cells : [ new sap.ui.commons.TextView({ text : "{id}", design : "H5", semanticColor : "Default" }), new sap.ui.commons.TextView({ text : "{name}", design : "H5", semanticColor : "Positive" }), new sap.ui.commons.TextView({ text : "{email}", design : "H5", semanticColor : "Positive" }), new sap.ui.commons.TextView({ text : "{mobile}", design : "H5", semanticColor : "Positive" }), ] }) }); }, error : function(err) { debugger; } }); } // UPDATE****************** if ('Update' == oEvent.oSource.mProperties.text) { var obj = {}; obj.id = that.getView().byId("uniqueid").getValue(); obj.email = that.getView().byId("emailid").getValue(); var updateurl = "/userdataSet(id='" + that.getView().byId("uniqueid").getValue() + "')"; myModel.update(updateurl, obj, { success : function(oData, oResponse) { debugger; alert('Record Updated Successfully...'); }, error : function(err, oResponse) { debugger; alert('Error while updating record - ' .concat(err.response.statusText)); } }); } // DELETE****************** if ('Delete' == oEvent.oSource.mProperties.text) { var delurl = "/userdataSet(id='" + that.getView().byId("uniqueid").getValue() + "')"; myModel.remove(delurl, { success : function(oData, oResponse) { debugger; alert('Record Removed Successfully...'); }, error : function(err, oResponse) { debugger; alert('Error while removing record - ' .concat(err.response.statusText)); } }); } } Save, Deploy and Run the application. You should be able to run the application using below URL http://hostname:8000/sap/bc/ui5_ui5/sap/zcrud_demo/index.html. Output:
Announcement
Evgeny Shvarov · Jun 4, 2020

InterSystems Developers Community Release, June 2020

Hi Developers! Want to share with you what we did in May 2020 to improve InterSystems Developers Community. Here are the new features: * New, better design for DC notification letters. * Editor in markdown: images import with hosting, decoration, etc. * Unanswered questions management improvements. Here we go! ## Better DC notifications design Since this release, we send you emails with an improved design which makes DC letters more readable, clear, accurate, and even beautiful. If this is not what you experience, please send your feedback in this post or into the issues section for DC. Here is an example of the notification: ## Markdown Editor Enhancements Since this release we make markdown as a first-class-citizen on DC: Images import and hosting, code highlighting, teaser brakes. Images can be drag-n-dropped with new markdown editor! We have the e - all that you asked! Even the Editor toolbar! Bravo DC Developers team! Moreover, I write this announcement in Markdown :) Because I can do it now with pleasure. I Hope, you will like this new feature as I do. ## Engagement for unanswered questions Developers! When we ask questions and get answers we often forget to mark replies as answers - please, don't forget to do this if the reply satisfies you and you can accept it as an answer. This makes the difference: everybody sees that problem is solved, the developer who replied you, understands that his answer was helpful and thus the world is getting a little bit better place. Since this release, we introduced a couple of new email notifications (very beautiful of course) which remind you that you have questions with new replies. Also, we added a new menu in your Member profile which gives you the quick access to unaccepted answers: We also introduced a number of other features and solved a lot of bugs. You can check this in [May's kanban](https://github.com/intersystems-community/developer-community/projects/26). And here is a new [June 2020 kanban. ](https://github.com/intersystems-community/developer-community/projects/27) You are very welcome for new [enhancement requests and bug reports](https://github.com/intersystems-community/developer-community/issues)! Stay tuned!
Announcement
Evgeny Shvarov · Aug 11, 2020

Proposed Topics for InterSystems IRIS FHIR Contest

Hi Developers! InterSystems FHIR contest has been started and in this post, I want to introduce several topics you may find interesting and use to build FHIR applications with InterSystems IRIS for Health. Amongst them are: a frontend mobile or web app for FHIR server FHIR REST API or SQL; Backend apps to perform complex queries and maintain rules; work with different HL7 data standards. See the details below. Mobile or Web application Mobile and web frontend applications are perhaps the most typical use cases to work with a FHIR server. If you use InterSystems IRIS for Health e.g. with the template we provide for the contest you get a FHIR server which exposes REST API ready to service the API calls to any FHIR resources according to FHIR R4 documentation. The related task. Tagging @Patrick.Jamieson3621 to provide more information. Also, you can consume FHIR data using SQL working with HSFHIR_I0001_R schema for full FHIR resources and HSFHIR_I0001_S schema to have SQL queries for certain entities of resources. E.g. you can visualize the blood pressure change of a patient with the time, the related task request. Another idea of the application is to maintain electronic immunization history, the request, tagging @Yuri.Gomes to provide more info. Examples of complex queries The medical information is very complex and thus implementations and examples of queries for FHIR data to support different real-life scenarios seem very helpful and demanded. E.g. the example of a query which looks for patients that have diabetes medications but no diabetes diagnosis. Tagging @Qi.Li to provide more information. Backend app upon rulesYou could build a backend application which analyzes the FHIR data and send alerts or perform different business operations. For example, consider the rule where the patient meets criteria (new lab result and new diagnosis) and send notifications. E.g. COVID-19 positive results. Related task requests: One, two. Tag @Rasha.Sadiq and @Qi.Li for more details. Data transformation apps As you know there are numerous legacy and comprehensive data formats for health data and all of them even the oldest are still in use or could be met. Thus the application which can deal with them and transfer it into FHIR R4 format and back could be always in demand. InterSystems IRIS for Health supports the majority of health standards and its data transformations so use it and introduce apps that can work with it handily and robustly. The related task request, tagging @Udo.Leimberger3230 for more details. CDA to FHIR data transformation iPhone can export health data to CDA, see the details. Transform this data into FHIR format using IRIS for Health and submit to the FHIR server. Here is an example of how you can transform CDA to FHIR data using IRIS for HEalth. Tagging @Guillaume.Rongier7183 for more details. A current set of proposed topics could be found here. Great topics! Thanks, @Evgeny.Shvarov for organizing everything Here is the new topic for the FHIR contest: CDA to FHIR data transformation iPhone can export health data to CDA, see the details. Transform this data into FHIR format using IRIS for Health and submit to the FHIR server. Here is an example of how you can transform CDA to FHIR data using IRIS for HEalth. Tagging @Guillaume.Rongier7183 for more details. The main announcement is updated too. Hey @Evgeny.Shvarov, I had an idea about creating a heat map using google or bing maps based on fhir data that shows a geographic representation of certain observation results? Looks like a great idea, please go ahead, @Rehman.Masood!
Announcement
Evgeny Shvarov · Aug 13, 2020

Technology Bonuses for the InterSystems FHIR Programming Contest

Hi Developers! Here're the technology bonuses for the FHIR programming contest that will give you extra points in the voting: FHIR Server REST API usage The usage of SQL Schema of FHIR Resources Healthcare standards data transformation Docker container usage See the details below. FHIR Server REST API usage - 1 point You get the bonus if you use the REST API endpoint of FHIR Server in InterSystems IRIS for health. You can take the IRIS-FHIR-Template which prepares the FHIR server during the docker image building. The documentation for FHIR API 4.0.1 could be found here. Learn more in InterSystems IRIS for Health documentation. FHIR SQL Schema usage - 1 point You can collect this technology bonus if you use FHIR SQL Schema in the SQL queries of your application. You can use this schema e.g. for making FHIR Analytics solution. Use HSFHIR_I0001_R for resources schema for full resources and HSFHIR_I0001_S schema to search with SQL for resources. Check the examples in the template. Healthcare standards transformations - 1 point InterSystems IRIS for Health contains Healthcare Interoperability modules which help to perform data transformations from different healthcare standards to FHIR and vice-versa. Make CDA to FHIR, HL7v2 to FHIR, or any other transformations in your application to collect this bonus. See the examples of HL7v2 to FHIR and CDA to FHIR transformations. Learn more in the documentation. Docker container usage - 1 point The application gets a 'Docker container' bonus if it uses InterSystems IRIS running in a docker container. The IRIS-FHIR-Template uses docker so you can collect this bonus if you build your solution using these templates. So! Feel free to ask any questions about using the listed technologies. Good luck in the competition! We analyzed the projects submitted for the contest and here is the matrix, which project gets what bonus: Name FHIR Server REST API usage FHIR SQL Schema usage Healthcare standards transformations Docker container usage iris-fhir-portal x x x iris4health-fhir-analytics x x x x fhir-chatbot x x QR-FHIR x x REST_API_with_FHIR_data_scheme x x Update: iris4health-fhir-analytics uses FHIR REST API too. iris-fhir-portal uses FHIR SQL Schema now. More details.
Announcement
Anastasia Dyubaylo · Aug 31, 2020

Winners of the InterSystems IRIS for Health FHIR Contest!

Hi Developers! The InterSystems IRIS for Health FHIR Contest is over. Thank you all for participating in our FHIR Competition! And now it's time to announce the winners! A storm of applause goes to these developers and their applications: 🏆 Experts Nomination - winners were determined by a specially selected jury: 🥇 1st place and $1,500 go to the iris-fhir-portal project by @Henrique.GonçalvesDias 🥇 1st place and $1,500 go to the iris4health-fhir-analytics project by @José.Pereira 🥉 3rd place and $500 go to the fhir-chatbot project by @Renato.Banzai 🏆 Community Nomination - an application that received the most votes in total: 🥇 1st place and $1,000 go to the iris-fhir-portal project by @Henrique.GonçalvesDias 🥈 2nd place and $500 go to the iris4health-fhir-analytics project by @José.Pereira Congratulations to all the participants! Thank you for your attention to the contest and the efforts you pay in this exciting coding competition! And what's next? A whole series of programming contests awaits InterSystems Developers! We will announce the next competition very soon – stay tuned! ➡️ More details in this post.
Announcement
Neal Assing · Aug 18, 2020

InterSystems Ensemble/Health Connect Developer Required

We have an immediate requirement for an experienced Intersystems Ensemble/Health Connect consultant to join our team with a good grounding in OO Programming, Healthcare Integration and at least 2 years experience with InterSystems Ensemble/Healthshare Health Connect The InterSystems Ensemble/Health Connect Consultant will be expected to go on to client sites, identify their needs and recommend how and what they should do in order to improve their business. From there you will then be expected to implement the services where required and provide documentation or training to compliment this. The successful candidate will have the ability to take ownership of technical projects, deal with any issues and see them through to completion. This will require excellent communication and management skills as well as a strong hands-on background in Healthcare Integration. This is an opportunity to play a key role in a growing business with real authority to make a difference along the way. Key skills 2 years InterSystems Ensemble/Healthshare Health Connect Experience BS or MS in Computer Science or equivalent; (Physics, Mathematics, Sciences) Software Development experience with Java, J2EE, JMS Ability to identify, analyze, discuss and confirm application/system requirements from customers and relevant stakeholders and produce detailed specifications Have sound understanding and experience with Information Technology and Systems and associated processes (development life cycle, testing processes, support, etc.) Good communication skills, (oral, verbal and written), with the ability to produce clear concise documentation, which is easily understood by developers and customers Experience with Application software testing and preparation of test plans and test data Knowledge of standard industry processes and methodologies (eg, for implementation, enhancement requests, development and product release, change control, customer support) Understand principles of Project Management and possession of core Project Management skills Proficient in Microsoft Office suite, Email, Internet Explorer as well as Unix A good understanding of the business issues within a specific domain such as banking, healthcare and retail Experience with other Middleware technologies (SOA & BPM) such as Mulesoft, SeeBeyond, JCAPS, WebMethods will be highly advantageous in this role Any experience working with MUMPS and Cache would also be beneficial Please apply using the following link: https://www.jobserve.com/gb/en/search-jobs-in-London,-London,-United-Kingdom/INTERSYSTEMS-ENSEMBLE-HEALTHSHARE-HEALTH-CONNECT-CONSULTANT-DEVELOPER-ENGINEER-D032A554C17488CB9E/ CALLS FROM CANVASSERS OR AGENCIES WILL NOT BE RESPONDED TO
Announcement
Daniel Kutac · Aug 27, 2020

InterSystems CZ & SK Webinar - August 2020

A Webinar was held today for our Czech and Slovak partners and end users. This webinar was an online version of what we originally planned to present earlier this year in Fabrika hotel, Humpolec as a workshop. Due to the current epidemiologic situation a decision was made to move the workshop into the virtual space. The webinar took about 2 1/2 hours and we covered the following areas of interest: Good news from market analyst firms and how it can help our partners to make selling easier. New features and functionality available with InterSystems IRIS 2020.1 and later InterSystems API Manager, InterSystems System Alerting and Monitoring Artificial Intelligence and Machine Learning with InterSystems IRIS Cloud deployments Transition from Cache / Ensemble to InterSystems IRIS The webinar used PowerPoint slides combined with live demos. We had an audience of almost 50 online participants; considering short notice and vacation time, this is a nice number for our region. Audience was actively asking questions and proposals that would likely end up in some follow up webinar(s) targeted at individual specific topis as indicated by our audience. This was our (Prague office) first virtual event so we learned new procedures and tools but everything worked very well. This, together with interest from our partners, is promising and we look forward to organize other webinars in some near future. Presentation slides are available for download. Please beware, slides are in Czech language only! On behalf of InterSystems Prague team Dan Kutac Nice! Is there any video recording, Dan? It's great to see the ZPM slide! like it! BTW, there is URL on OEX, which shows only the applications which could be deployed via ZPM. Hi Evgeny, yes, we do have video recording available. just need to make sure it's good to publish it. it's in Czech language, though. Hey Developers! Now this webinar recording is available on InterSystems Developers YouTube Channel: Enjoy watching this video!
Article
Yuri Marx Pereira Gomes · Feb 24, 2021

Day 2: Developing with InterSystems Objects and SQL

I'm participating in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during the training. Tips presented in the day 2: You can create persistent classes (classes with a correspondent table in the database to persist class properties). An Persistent class example: Class dc.Person extends (%Persistent) { Property Name As %String; Property BirthDate As %Date; } When you extends %Persistent, you get %New() to create a new instance in the memory, %Save() to save in the database and %Id() to get the unique ID to the instance in the Database and %OpenId() to load the instance with database values. Persistent classes allow you calls %Deleteid() to delete an instance from the database, %DeleteExtent() to delete all saved objects (delete without where!) and %ValidateObject() to validate data passed before save (validate required, sizes, etc). Persistent classes have %IsModified() to check with the data changed in the memory (see joel tip in the comments) and %Reload() to get these changes. To get possible errors when you try to %Save() or %Delete(): set status = person.%Save(), write status. If success in save will return 1. We can use do $system.Status.DisplayError(status) to see error details. To call persistent class methods do: ##class(dc.Person).%Save(). To call a persistent instance method do: ..Method(). It's the same to refer a properties, do: write ..Name. To remove an object ou variable from program or terminal memory use kill person or set person = "". If you use kill only, all references wiil be removed from memory (not from database, to database use killextent). If you want a utility method to populate test data, extend your persistent class with %Populate and call Populate(number of rows). You can create embedded classes to a persistent class extendind %SerialObject (a persistent class without Id, because is linked with a persistent class). Example: Class PackageName.ClassName Extends %SerialObject { Property Phone As %String; Property Email As %String; } This serial will be a property into your persistent class: Class dc.Person extends (%Persistent) { Property Name As %String; Property BirthDate As %Date; Property Contact As dc.Contact; } In IRIS Database will be create only one table with Person and Contact properties. You can create Indexes to get uniqueness or to tunning queries. Example: Index NameIndex On Name [Unique]. If you create an index you need to build the index in the Management Portal if table is not empty. To create a constructor method override %OnNew(). This is a callback method called when call %New(). There are other callback methods. IRIS has a great support to JSON. You can load a JSON to a object calling set name = {}.%FromJSON("{""Name"":""Yuri""}"). You can write a JSON from the object executing: name.%ToJSON(). To JSON arrays exists in the IRIS and Caché (thanks @RobertC..Cemper alert), but only in IRIS we have fomatter and zwrite to JSON. Tomorrow I will publish the day 3. PS.: this is a resume, but there are more content learned in the course. #20. Is slightly exaggeratedofficial docs present it differently.https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=ITECHREF_json https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?LIBRARY=%25SYS&CLASSNAME=%25Library.DynamicArray Fixed! Thanks On #5: %IsModified() and propertynameIsModified() methods tell you whether the object in memory has been changed in memory (not on disk). Thanks the revision, fixed!
Article
Yuri Marx Pereira Gomes · Feb 25, 2021

Day 3: Developing with InterSystems Objects and SQL

I'm participating in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during the training. Tips presented in the day 3: You can see your class catalog using %Dictionary classes and see your sql objects into INFORMATION_SCHEMA table. Is possible use SQL inside your ObjectScript methods using Dynamic SQL or Embedded SQL. You can pass parameters into Dynamic SQL string using ? (eg.: where country = ?) and pass parameters to Embedded SQL using colon (ed.: where country = :variable). Dynamic SQL Sample (from Intersystems documentation): SET tStatement = ##class(%SQL.Statement).%New(,"Sample") SET myquery = 3 SET myquery(1) = "SELECT TOP ? Name,DOB,Home_State" SET myquery(2) = "FROM Person" SET myquery(3) = "WHERE Age > 60 AND Age < 65" SET qStatus = tStatement.%Prepare(.myquery) IF qStatus'=1 {WRITE "%Prepare failed:" DO $System.Status.DisplayError(qStatus) QUIT} DO tStatement.%Display() WRITE !,"End of %Prepare display" Embedded SQL Sample (from Intersystems documentation): #SQLCompile Select=Display &sql(SELECT DOB INTO :a FROM Sample.Person) IF SQLCODE<0 {WRITE "SQLCODE error ",SQLCODE," ",%msg QUIT} ELSEIF SQLCODE=100 {WRITE "Query returns no results" QUIT} WRITE "1st date of birth is ",a,! DO $SYSTEM.SQL.Util.SetOption("SelectMode",1) WRITE "changed select mode to: ",$SYSTEM.SQL.Util.GetOption("SelectMode"),! &sql(SELECT DOB INTO :b FROM Sample.Person) WRITE "2nd date of birth is ",b Embedded SQL Sample - Insert: &sql(INSERT INTO Sample.Person (Name, Age, Phone) VALUES (:name, :age, :phone) If you need process data in batch use SQL, if you process a single record, use Persistent Object API. You can create SQLQuery methods and if you use [SqlProc] in the method, will be created a SQL procedure in the SQL side. From terminal is possible go to SQL Shell, a terminal to SQL commands, from terminal, execute do $system.SQL.Shell(). Persistent classes have a system generated ID, if you need ID controled by you, use IDKEY index with one or more properties. Eg: Index Key on SocialNumber [IdKey, PrimaryKey, Unique]. There two strategies to control concurrency when two or more process try process the same data at same time: Pessimistic and Optimistic. To acquire a pessimistic control, lock the object with %OpenId(ID, 4), where 4 lock the table to exclusive access. After process ran the lock can be released. To do optimistic control (indicated to web apps), create in your persistent class Parameter VERSIONPROPERTY = "Version"; Property Version as %Integer [ InitialExpression = 1 ]. IRIS will increment property version in each instance update, allowing coordinate the order of updates, instead lock table. When you have methods that update, insert or delete data, use transactions, to keep the data consistency. Example: Transfer(from,to,amount) // Transfer funds from one account to another { TSTART &SQL(UPDATE A.Account SET A.Account.Balance = A.Account.Balance - :amount WHERE A.Account.AccountNum = :from) If SQLCODE TRollBack Quit "Cannot withdraw, SQLCODE = "_SQLCODE &SQL(UPDATE A.Account SET A.Account.Balance = A.Account.Balance + :amount WHERE A.Account.AccountNum = :to) If SQLCODE TROLLBACK QUIT "Cannot deposit, SQLCODE = "_SQLCODE TCOMMIT QUIT "Transfer succeeded" } InterSystems IRIS has an Architecture based in Namespaces (logical groups of databases) and Databases. There two types of data to hold in the databases: for data (globals) and for code (source code - procedures). You can do horizontal processing scaling to your databases using ECP - Enterprise Cache Protocol, allowing see different databases in several servers in the same namespace. You can do horizontal data volume scaling (distributed database partitions) using Sharding (only IRIS), allowing partitioning data into distributed nodes (like MongoDB). The maximum size to a database is 32TB. To change from a namespace to another do zn "Namespace" or set $namespace = "Namespace". PS 1: the course show in details how to do transactions control, this is very important. Tomorrow I will post day 4 resume. Point #16: There is only one type of database. Databases can hold code only, data only, or code and data together. Fixed, thanks!
Article
Yuri Marx Pereira Gomes · Mar 1, 2021

Day 4: Developing with InterSystems Objects and SQL

I'm participating in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during the training. Tips presented in the day 4: All data are stored in Globals and Global names start with ^. Example of global: ^animal. Global can have multiples locations to the data ("sub data"). Example: ^animal(1). ^%* globals are accessible from any system-wide (from any namespace). Globals enables IRIS to support multimodel data (object, relational, document, multidimensional, etc). To see globals go the Management Portal > Explorer > Globals > Select Global > View or in Terminal type do ^%G or zwrite ^global. There are an automatic correspondence between persistent classes and SQL Tables: Package is SQL Schema; Class is a Table; Property is a Column; Method is a Store Procedure; (when sqlProc); Relationship between classes is a SQL Foreign Key constraint (must be bi-directional); Object is a Row. One table can correspond to multiple classes, but serial class is part of the table of the persistent class (don't have a specific table). One class can correspond to multiple tables. We have some classes types: Non-registered: not class object (container for methods only); Registered: transient objects; Persistent: SQL persistence in tables; Serial: SQL persistence in the main table (serial is embedded); Datatype: not class object is used to do new validations and conversions to base data types. Classes can be composed by: Properties; Methods; Class queries: SQL Select statements; Parameters: user constants or system constants to configure the class behavior; Foreign keys: to referencial integrity; Indexes: to improve performance and do unique values; Triggers: fire methods associated with persistence events; XData: XML or JSON definitions associated with the class; Storage: description of the data storage. Classes by convention has first letter of the word in Capital. Example: CountryOrigin. Parameters are all capital. Example: COLORNUMBER. Class attributes qualify/configure a class. Example [SqlTableName = Animal] set the table name to a class. [Final] not allows inheritence. [Private] not allows call methods or use properties for non-subclasses. Internally IRIS generate Get and Set to properties, and are not visible but can be declared to change the behavior. Is possible override a method of the superclass, to do this, repeat the class name, the arguments. Is possible increase the number of arguments, not decrease. Use ##super() to call base class method. To create abstract class use [Abstract] and prevent instantiation. Is possible extends multiple classes. Example Class Person extends (%Persistent, %Animal). (Persistent must be the fisrt in the extends, see joel tip in the comments) REST is REpresentational State Transfer. Is based in the HTTP protocol. Use HTTP verbs: GET (select), POST (insert), PUT (update) and DELETE (delete). For expose your class as REST resource extend from %CSP.REST. Use URLMap inside XData block to configure the routes of your REST service. Using the Portal, create a Web Application, enable REST and specify Dispatch class. %JSONAdaptor provides convertion between objects and JSON. Use obj.%JSONImport(jsonObj) to assign DynamicObject to a object. Use obj.%JSONExportToString(.jsonString) to write a JSON String to a object. %JSON.Formatter format a JSON String for human readability. Good tips! Congrats! Could you give an example for items 6 and 7? I always thought that the relationship was a class for a table. 6 & 7 are side effects of object inheritance.Think of a class Person.But Employee Extends PersonSimilar Students Extends Person tooSo you have 3 tables but all are Persons Some with extension some not. @6: Table Employee corresponds to class Person and to class Employee @7: So class person corresponds to Table PERSON, EMPLOYEE , STUDENT Yes, thanks the nice example. Regarding 9, can we change the stored information manually? I know it is generated automatically. @9.9. storage is generated once if not existing yet.you may change it manually (typically data location global) as long as there is nothing stored yetotherwise you lose the existing content. Or you copy it to the new location.My article The adopted Bitmap shows such an example [actually also in contest} Hello YURI MARX GOMES, Thank you for your articles. Always good tips Thanks @Delphine.Morel, good to hear this, is an incentive to keep writing more articles. Point 5-5: Relationship on the object side is bi-directional. Class A has a reference to class B, and class B has a collection of references to class A. On the SQL side, table A has a reference to table B, along with automatic referential integrity. Point 16: Important: for a class to be persistent, %Persistent must be the first class. So the example should be: Class Person extends (%Persistent, Animal) Thanks additional tips! If there is no storage definition then a storage definition whose type is %Storage.Persistent is created when compiling the class. This is done before the storage definition is compiled (every class member is compiled by the class compiler). Then, when the storage definition is compiled and if the type is %Storage.Persistent then the %Storage.Persistent.STORAGECOMPILERCLASS will generate a full storage definition for the current class definition. What does that mean? Well - if this is the first time this storage definition has been compiled then it is most likely empty, other than the type class. The STORAGECOMPILERCLASS will generate a complete storage definition. But even if the storage definition is already defined, the STORAGECOMPILERCLASS still reviews that definition. If there are any changes detected to the class definition then the storage definition is updated to reflect those changes. That means that the user can manually edit the storage definition at any time and the storage compiler will simply make sure that the definition is "complete" - no missing properties, no missing indexes, and so on. Bottom line is that the user is free to make any desired changes, including deleting the storage definition completely. Keep in mind that some changes can make the compiled class incompatible with existing data. Just to clarify - inheritance considers the primary super class hierarchy. %Persistent must be the first class some where in the primary super class hierarchy. Sample.Employee extends Sample.Person which extends %Library.Persistent. Great, thanks!
Article
Yuri Marx Pereira Gomes · Mar 2, 2021

Day 5: Developing with InterSystems Objects and SQL

I finished my participation in the Developing with InterSystems Objects and SQL with Joel Solon. The course is very nice and I will share with you some tips I got during this the training final day. Tips presented in the day 5: %SYSTEM package has general utiliy classes. Use $system.class.Help() to list the utilities. The main %SYSTEM classes are Encryption (industry encryption methods), OBJ to manage classes and objects, Security for security methods and SQL to use SQL language. IRIS allows validation to the properties and arguments using MINVAL and MAXVAL to integer, FORMAT to date and time, SCALE to decimal, MINLEN, MAXLEN, TRUNCATE, VALUELIST (restrict the input to a list of values) and PATTERN to string. Example: Method Print(name As %String(MAXLEN=50)). You can create new data type validations and convertions extending a datatype like %String and using DisplayToLogical() and LogicalToDisplay() to implement new behaviors. Is possible change the datatype parameter like the PATTERN parameter for change the validation of a string. IRIS uses -> operator to do implicit joins, example: select Country->States->County from Simple.Places. This joins 3 related tables. To create a reference between classes/tables use ForeignKey. Example: ForeignKey CountryFK(Country) References Simple.Country() [ OnDelete = setnull ]. There are the options setnull to set null to the otherside table/class, cascade to propagate the deletion, noaction to no action and setdefault to configure a default value to the reference. Use %ConstructClone() to do a clone of a object and its references. Use SqlComputeCode to the calculated fields. Example: (from IRIS documentation) Property FullName As %String [ SqlComputeCode = {set {*}={FirstName}_" "_{LastName}}, SqlComputed ]; Is possible automate tests using %UnitTest framework. Use %UnitTest.TestCase for defining test cases and %UnitTest.Manager for running a set of Test Cases. To see the results go to System Explorer > Tools > UnitTest Portal. See https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=TUNT. IRIS supports 2 type collections: List: key based on position starting in 1. Declaration: Property States as list of Simple.State. Get: country.States.GetAt(1) Insert: country.States.Insert(florida) Remove: country.States.RemoveAt(1) Count: country.States.Count() Clear: country.States.Clear() Next: country.States.GetNext(1) - to get item 2 Loop: for i=1:1:country.States.Count() { write !, country.States.GetAt(i) Array: key based on associated value. Declaration: Property States as array of Simple.State. Get: country.States.GetAt("FL") Insert: country.States.SetAt(florida, "FL") Remove: country.States.RemoveAt("FL") Count: country.States.Count() Clear: country.States.Clear() Next: country.States.GetNext("FL") - to get item GA Loop: set state = "" for { set val = country.States.GetNext(.state) quit: (state = "") write !, val } To create relationships between classes, we have: Parent/Children: Relationship States as Simple.State [ cardinality = children, Inverse = Country ]. The otherside: Relationship Country as Simple.Country [ cardinality = parent, Inverse = Country ]. One/Many: Relationship States as Simple.State [ cardinality = many, Inverse = Country ]. The otherside: Relationship Country as Simple.Country [ cardinality = one, Inverse = Country ]. One-To-One and Many-to-Many are not supported. One-To-One may be simulated and Many-To-Many can be made using 2 Many-to-One to a relationship table. Stream is object that can contain amount of data larger than limit of regular properties, may store characters (%Stream.GlobalCharacter) or binary (%Stream.GlobalBinary) data. Use the following methods to read/write data: Write(text): write in the end of line; WriteLine(text): write to a new line; Clear(): clear the content of the stream; CopyFrom(stream): copy from a stream and overwrite the current content; Read(length): read characters limited to the length; ReadLine(length): read characters in the current line limited to the length; Rewind(): retorna para o início do stream; MoveToEnd(): move to end of stream. You can use triggers to do something before or after a CRUD event. Example: Trigger T1 [Event = INSERT, Time = AFTER, Order = 1, Foreach = row/object] { write your code }. The IRIS has some functions frequently used: $EXTRACT: get a substring - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fextract $FIND: get the position of a value passed as argument - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_ffind $LENGTH: get the size of a string or substring - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flength $LIST: return/create a list of elements - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flist $LISTDATA: return the element in the list by position - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flistdata $LISTFIND: return the index of a element in the list - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flistfind $LISTGET - get an element in the list - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flistget $LISTLENGTH - get total of elements in the list - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flistlength $PIECE - return or replace a substring using a delimiter - https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fpiece The course was very nice and has a rich set of practical exercices. The course is important to preparation to IRIS developer certification too. See the course agenda in https://www.intersystems.com/support-learning/learning-services/classroom-learning/?course-view=course-schedule. @11: 1:1 could be a degraded 1:N relationship orby inheriting from a base class as mentioned earlier: "Employee Extends Person" many-to-many can be covered as M:N relationship as I described in my article 3 years ago. Thanks Cemper. Point #11: one-to-one is not supported but can be imperfectly simulated. many-to-many is supported by combining one-to-many among 3 classes. Oops! I posted this without noticing that Robert already handled this one! Perfect! Thanks the contribution! The interactive tutorials with exercises built into the documentation helped me a lot in my time: Caché Tutorial Topics Map Caché Tutorials Also included was a database "SAMPLES" (code and data) with examples for every taste. I often used it for performance testing. Note: I give a link to version 2016.2, because since version 2017.1, for some reason, the developers have changed the display styles in the online documentation and removed some information. Local documentation does not have these disadvantages. In addition, in the <cachesys>\dev\ folder there were numerous demos with source code for various programming languages and connection technologies (С++, C#, Java, PHP, Python, ODBC, JDBC, ADO.NET, ActiveX, XEP, etc.): Incomplete content \dev\tutorials\ \dev\tutorials\csp \dev\tutorials\java \dev\tutorials\mv \dev\tutorials\pojo \dev\tutorials\security \dev\tutorials\UnitTestEx \dev\tutorials\webservices \dev\tutorials\zen \dev\Cache\ \dev\Cache\callin \dev\Cache\callout \dev\Cache\cctrlcpp \dev\Cache\cctrlvb \dev\Cache\ctrldemo \dev\Cache\HAcluster \dev\odbc\samples\ \dev\odbc\samples\php \dev\odbc\samples\select \dev\odbc\samples\sqlgateway \dev\python\ \dev\python\samples \dev\python\samples3 \dev\cdirect \dev\cpp\samples \dev\dblib\samples \dev\dotnet\samples \dev\java\samples \dev\mv\samples \dev\node.js\samples \dev\perl\samples Great tip, thanks! I think Objects and Groovy are actually a bit similar... I don't know if my idea is right or wrong, actually I write very little Objects. Thank you for sharing your experience, It seems to be an enriching training
Announcement
Evgeny Shvarov · Mar 3, 2021

Technology Bonuses for Projects of the InterSystems Grand Prix!

Hi Developers! We had a set of technology bonuses for the InterSystems Grand Prix contest. And here is how projects collected it: Project Total Bonus zapm 10 HealthInfoQueryLayer 13 Data extraction solution between heterogeneous systems 0 Airplane React, Material UI, and REST API 10 springboot-iris-crud 10 iris-rad-studio 4 iris-python-suite 7 fhir-chatbot 11 iris-ml-suite 10 IRIS Interoperability Message Viewer 10 isc-generate-db 10 iris-image-index-demo 17 iris4health-fhir-analytics 23 interoperability-integratedml-adapter 23 iris-integratedml-monitor-example 12 iris-analytics-notebook 14 ObjectScript Reports 0 iris-for-money 12 vscode-intersystems-iris 14 ObjectScript Kernel 5 apptools-admin 10 RESTFUL_API_For_Hotel_OverBooking_System 10 units 2 realworld-intersystems-iris 12 isc-tar 6 BlocksExplorer 8 iris-fhir-portal 15 npm-iris 12 iris-history-monitor 12 Dictionary comparison scheme of cache database 0 IRIS-REST-API-DATABASEMANAGER 13 ISC DEV 4 M-commands instead of Excel formulas in cells 2 appmsw-telestat 13 isc-apptools-lockdown 4 WebSocket Client JS with IRIS Native API as Docker Micro Server 5 Wsock-Embedded-Py 10 Terminal Multi-Line Command Editor 4 The adopted Bitmap 8 Using ZPM for Node.js 7 cmPurgeBackup 4 IRIS import manager 5 Questy 7 ➡️ Here you can find a detailed distribution of bonuses for each application ⬅️ This table is subject to change upon project improvements or if we missed something. Fill free to claim the bonus in the comments here or on discord. Stay tuned!
Announcement
Anastasia Dyubaylo · Jun 10, 2021

Video: Automating InterSystems IRIS Instances Configuration

Hi Community, Please welcome the new video on InterSystems Developers YouTube: ⏯ Automating InterSystems IRIS Instances Configuration Learn how the CPF merge facility allows you to define, in an easy and declarative way, the ultimate state of an InterSystems IRIS data platform instance. This solution allows you to embrace cloud-native, GitOps-like configuration operations. 🗣 Presenter: @Luca.Ravazzolo, InterSystems Product Manager Additional materials to this video you can find in this InterSystems Online Learning Course. Enjoy watching this video! 👍🏼