Pesquisar

Artículo
· 10 hr atrás Lectura de 2 min

サマータイムの対応について

これは InterSystems FAQ サイトの記事です。

InterSystems 製品の内部日付時刻($HOROLOG)を利用して時刻を取得している場合、オペレーティング・システムが提供するアルゴリズムに基づいて季節的な時刻調整を行います。

そのため、オペレーティングシステムにてサマータイムの調整が行われる場合は、InterSystems 製品は、オペレーティングシステムで対応したサマータイム時刻で動作します。

注意点としては、$HOROLOG 値が大きく変更されるケースもあるため、時刻比較やこの値をキーにしたアプリケーションの処理などがもしある場合は、その変更を考慮していただく必要があります。

ご参考:「ローカル時刻調整のしきい値

なお、$NOW() 関数を使用して内部日付時刻を取得している場合は、オペレーティングシステムのサマータイムの調整に対応していませんのでご注意ください。

$NOW() 関数は、$ZTIMEZONEの値を使用してローカル時刻を決定しています。
$ZTIMEZONEは1年を通して連続的で、サマータイム(DST)などのローカル時刻の調整に対応していないためです。

また、小数点以下を含むタイムスタンプ値をサマータイム対応済のローカル時刻で取得したい場合、$HOROLOG では対応できませんので、以下の2つ方法のどちらかを利用して取得します。

1)$ZTIMESTAMPの値を利用して、ロカール時刻に変換する方法を利用する方法

$ZDATETIMEH()の第2引数に -3 を指定することで UCT 時刻からローカル時刻に変更されます。また、$ZDATETIME()の第4引数を利用して、時刻値の小数点の有効桁数を指定できます。

write $ZDATETIME($ZDATETIMEH($ZTIMESTAMP,-3),3,,6)

 

2)%Library.UTCクラスのNowLoca()メソッドを使用する方法(注意:小数第3位までの固定出力です)

write ##class(%UTC).NowLocal()
Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 10 hr atrás Lectura de 4 min

如何按时间间隔或计划运行进程?

当我开始使用 InterSystems IRIS,尤其是在互操作性方面时,我最初遇到的一个常见问题是:如何在间隔时间或计划内运行某项功能?在本专题中,我想分享两个简单的类来解决这个问题。我很惊讶在 EnsLib 的某个地方没有找到类似的类。也许是我搜索得不好?总之,这个主题并不意味着是复杂的工作,只是为初学者提供了几个片段。

假设我们有一项任务是"从 API 获取数据并将其放入外部数据库"。要完成这项任务,我们需要

  1. Ens.BusinessProcess,其中包含我们数据流的算法:如何准备获取数据的请求,如何将 API 响应转换为数据库请求,如何通过数据流生命周期处理错误和其他事件
  2. EnsLib.REST.Operation 用于使用 EnsLib.HTTP.OutboundAdapter 向 API 提出 HTTP 请求
  3. Ens.BusinessOperationEnsLib.SQL.OutboundAdapter,用于通过 JDBC 连接将数据输入外部数据库

关于这些业务主机的实现细节不在本文讨论范围之内,我们假设已经有了一个进程和两个操作。但如何运行这一切呢?进程只能通过入站请求运行......我们需要一个启动器(Initiator)!我们需要一个启动器!这个启动器将通过间隔运行,并向我们的进程发送一个虚假请求。

下面就是这样一个启动器类。我添加了一些额外的功能:使用同步或异步调用,如果有许多主机作为目标,可以在出错时停止或不停止进程。但这里主要是一个目标列表。我们将向列表中的每个项目(业务主机)发送请求。请注意 OnGetConnections 事件——它是在生产用户界面中正确建立链接所必需的。

/// Call targets by interval
Class Util.Service.IntervalCall Extends Ens.BusinessService
{

/// List of targets to call
Property TargetConfigNames As Ens.DataType.ConfigName;
/// If true, calls are made asynchronously (SendRequestAsync)
Property AsyncCall As %Boolean;
/// If true, and the target list contains more than one target, the process will stop after the first error
Property BreakOnError As %Boolean [ InitialExpression = 1 ];
Property Adapter As Ens.InboundAdapter;
Parameter ADAPTER = "Ens.InboundAdapter";
Parameter SETTINGS = "TargetConfigNames:Basic:selector?multiSelect=1&context={Ens.ContextSearch/ProductionItems?targets=1&productionName=@productionId},AsyncCall,BreakOnError";
Method OnProcessInput(pInput As %RegisteredObject, Output pOutput As %RegisteredObject, ByRef pHint As %String) As %Status
{
    Set tSC = $$$OK
    Set targets = $LISTFROMSTRING(..TargetConfigNames)

    Quit:$LISTLENGTH(targets)=0 $$$ERROR($$$GeneralError, "TargetConfigNames are not defined")

    For i=1:1:$LISTLENGTH(targets) {
        Set target = $LISTGET(targets, i)
        Set pRequest = ##class(Ens.Request).%New()

        If ..AsyncCall {
            Set tSC = ..SendRequestAsync(target, pRequest)
        } Else  {
            Set tSC = ..SendRequestSync(target, pRequest, .pResponse)
        }
        Quit:($$$ISERR(tSC)&&..BreakOnError)
    }

    Quit tSC
}

ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
{
    If pItem.GetModifiedSetting("TargetConfigNames", .tValue) {
        Set targets = $LISTFROMSTRING(tValue)
        For i=1:1:$LISTLENGTH(targets) Set pArray($LISTGET(targets, i)) = ""
    }
}

}

之后,您只需将该类添加到生产中,并在 TargetConfigNames 设置中标记我们的业务流程。

但如果需求发生了变化怎么办?现在我们需要每周一上午 08:00 运行数据抓取器。最好的办法是使用任务管理器(Task Manager)。为此,我们需要创建一个自定义任务,以编程方式运行启动器。下面是该任务的简单代码:

/// Launch selected business service on schedule
Class Util.Task.ScheduleCall Extends %SYS.Task.Definition
{

Parameter TaskName = "Launch On Schedule";
/// Business Service to launch
Property ServiceName As Ens.DataType.ConfigName;
Method OnTask() As %Status
{
    #dim tService As Ens.BusinessService
    Set tSC = ##class(Ens.Director).CreateBusinessService(..ServiceName, .tService)
    Quit:$$$ISERR(tSC) tSC
    
    Set pRequest = ##class(Ens.Request).%New()
    Quit tService.ProcessInput(pRequest, .pResponse)
}

}

这里有两件重要的事情:

  • 您必须将 Initiator 业务服务的 Pool Size 设置为 0,以防止通过调用间隔运行它(选项 Call Interval,您可以清除或保持原样——当 Pool Size 为 0 时,它不会被使用)。

  • 您需要在 Task Manager 中创建一个任务,选择"Launch On Schedule" 作为任务类型(不要忘记选中命名空间),将我们的启动程序业务服务名称设置为 ServiceName 参数,并设置所需的日程。请参阅:System Operation > Task Manager > New Task

奖励

我经常遇到这样的情况:我们需要在生产中按需运行某些功能。当然,我们可以为此在 CSP 上创建一些自定义用户界面,但重新发明轮子不是我们的办法。我认为最好使用管理门户(Management Portal)的典型用户界面。因此,我们之前创建的任务也可以手动运行。只需将任务运行类型更改为 On Demand。按需任务列表可在 System > Task Manager > On-demand Tasks,请参见 Run 按钮。此外, Run 按钮(手动运行)可用于任何类型的任务。

就是这样。现在,我们的业务主机有了一个漂亮的互操作性架构。还有 3 种运行数据采集器的方式:按时间间隔、按时间表或手动。

Comentarios (0)1
Inicie sesión o regístrese para continuar
Pregunta
· 25 dic, 2025

Managing FHIR test resources on my prod server

Hi, 
Our production FHIR server is populated by several processes from several sources, 
some of those sources send test data or wrong data (by mistake or as part of an integration test), 
the data is consumed by our BI every 15 minutes.
when I mark a resource as test (using meta security) BI knows to update it on their system.
everything is fine up to here (except that there is test data in Prod)
my problem is that if someone send the same patient again it will recreate the patient without the security tag.
any thoughts?
 

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 25 dic, 2025 Lectura de 6 min

Why Buying a New Project is Better Than Resale Homes

Buying a home is a big deal. It is probably the most expensive thing you will ever buy. So, you don’t want to mess it up.

When you start looking, you have two main choices. You can buy a brand-new home from a builder. Or you can buy a resale home from another person.

Both have pros and cons. But lately, new homes make more sense for most people.

If you are looking at a Real Estate Residential Project In Greater Noida, you might be wondering if it is better than buying an old flat nearby. Here is why going for a new project is usually the smarter move.

1. You Get Modern Amenities

Old apartments are simple. They have a roof, walls, and maybe a small park. That was enough twenty years ago. It is not enough now.

New projects are different. They are built for how we live today.

Think about parking. In older colonies, parking is a fight. The spots are small. Sometimes you have to park on the street. It is not safe for your car.

In a new project, you get a dedicated spot. It is often covered. You don’t have to worry about scratches or theft.

Then there are the extras. Most new projects have gyms. They have swimming pools. Some even have coworking spaces. This is huge if you work from home. You can leave your flat and work in the clubhouse. You don’t get that in a resale home.

2. No Renovations Needed

When you buy a resale home, you buy someone else’s problems.

The paint might look fresh, but the pipes inside the walls could be thirty years old. The wiring might be bad. The kitchen cabinets might be falling apart.

You will spend months fixing things. You have to hire contractors. You have to buy materials. It costs a lot of money. It also takes a lot of time.

With a new home, everything is clean. The tiles are new. The bathroom fittings are unused. The electricals are up to code.

You just move in. You don’t have to hammer down walls or fix leaks. You can spend your weekends relaxing, not supervising workers.

3. Better Safety and Security

Safety standards have changed.

Old buildings might not be safe during an earthquake. They might not have fire sprinklers.

New projects have to follow strict rules. They are built with better concrete. They are designed to handle earthquakes better. They have fire alarms and extinguishers on every floor.

Security is also tighter.

In an old independent house or older society, anyone can walk in.

New projects have gates. They have guards 24/7. They have CCTV cameras in the hallways and parking lots. Most use apps to track visitors. If a delivery guy comes, you get a notification on your phone. You know exactly who is at your door.

This peace of mind is worth a lot. especially if you have kids or elderly parents at home.

4. Energy Efficiency

Electricity bills are going up. Old homes waste energy.

They usually have single-pane windows. These let in heat in the summer and cold in the winter. Your AC has to work harder. Your heater runs longer.

New construction is "green." Builders use better materials now. They use double-glazed windows. These keep the temperature stable inside.

They also design the layout better. New flats get more natural light. They have better airflow. You might not need the lights on all day.

Many new projects also use solar power for common areas. This lowers the maintenance bill for the society. Over ten years, these savings add up.

5. Easier Financing and Payment Plans

Banks like new projects. If the project is approved by major banks, getting a loan is easy. The paperwork is standard.

When you buy resale, the bank has to check the property value carefully. If the building is too old, they might not give you a loan for the full amount. You might have to pay a bigger down payment.

Also, builders offer payment plans.

In a resale deal, you have to pay the seller quickly. You usually need to arrange all the money within a month or two.

With a new project, especially one under construction, you pay in stages. You pay a bit now. You pay more when the structure is done. You pay the rest when you get the keys.

This is easier on your wallet. It gives you time to save money while the house is being built.

6. No Legal Surprises

This is a big one. Property fraud happens.

In resale, the paperwork can be messy. The owner might have lost the original deed. There might be a dispute with a brother or sister over who owns the land. You might not find out until after you pay.

New projects are regulated. In India, we now have RERA. This is a law that protects buyers. Builders have to register their projects. They have to upload all the documents online. You can check everything yourself.

If the builder delays the project, they have to pay you interest. If they change the plan, they need your permission.

This makes buying a new project much safer than a random resale deal.

7. The Technology Factor

Our lives run on technology now. We have smart TVs, multiple laptops, and smart fridges.

Old homes were not built for this. They have one or two plug points in a room. You end up using extension cords everywhere. It looks messy and can be dangerous.

New homes have plenty of outlets. They have points for USB charging. They have proper cabling for high-speed fiber internet.

Some new luxury projects are "smart-ready." You can control the lights and AC with your voice. The infrastructure is already there. Retrofitting an old home with this tech is a nightmare. You have to cut into walls to run new wires. In a new home, it just works.

8. Customization Options

If you buy early enough in a new project, you can make changes.

Maybe you want a bigger living room. You can ask the builder to remove a wall. Maybe you don’t like the standard floor tiles. You can ask for different ones.

In a resale home, what you see is what you get.

If you don’t like the pink bathroom tiles in a resale home, you have to rip them out yourself. In a new project, you can often pick the colors before they are installed. It feels more like your home, not someone else’s old house.

9. Better Resale Value

Think about the future.

If you buy a 20-year-old home today, in ten years it will be 30 years old. It will look dated. The building will need major repairs. The value might not go up much.

If you buy a new project, it is fresh. For the next five to ten years, it is still considered "modern."

Also, new projects usually come up in developing areas. As the area grows—new roads, new schools, new shops—the value of your home goes up. You have a better chance of making a profit if you decide to sell later.

10. The Community

Who are your neighbors?

In old societies, people have lived there for decades. Groups are already formed. It can be hard to fit in.

In a new project, everyone is new. Everyone is moving in at the same time.

It is easier to make friends. You are all figuring out the new gym together. You are all setting up your houses at the same time.

There are usually many young families. If you have kids, they will have plenty of playmates. It creates a vibrant, active atmosphere. Old colonies can sometimes feel a bit quiet or empty if the original owners have aged or moved away.

11. Floor Plans That Make Sense

Architecture changes.

Old homes often have wasted space. Long hallways that serve no purpose. Small windows. Closed-off kitchens.

Modern designs focus on "usable area." They have open kitchens that look into the living room. This makes the house feel bigger. They have large windows / balconies.

They minimize wasted space. Even a smaller flat in a new project can feel bigger than an old flat because the layout is smarter.

Conclusion

Buying a home is a personal choice. Some people love the charm of an old building. They like the big trees and the established vibe.

But for most of us, practical things matter more.

We want a home that works. We don’t want to spend our weekends fixing leaks. We want a safe place for our kids. We want a parking spot.

A new project offers all of this. It is cleaner, safer, and smarter.

It is not just about the four walls. It is about the lifestyle.

When you weigh the costs of renovation and the headaches of old paperwork against the ease of a new build, the answer is clear.

If you can wait a little for construction, or find a ready-to-move new unit, go for the new project. You will sleep better at night. And you won't have to worry about the roof leaking on your head.

Comentarios (0)1
Inicie sesión o regístrese para continuar
Artículo
· 25 dic, 2025 Lectura de 5 min

testcontainers-iris-nodeの紹介。Node.jsでIRIS統合テストを簡素化する

概要統合とE2Eテストのために一時的なInterSystems IRISコンテナの起動を簡単にするNode.jsライブラリ、testcontainers-iris-nodeのリリースをお知らせします。 このプロジェクトが、testcontainers-iris-pythontestcontainers-iris-javaなどを含む、IRIS用Testcontainersアダプターの既存ファミリーに加わるのは極めて自然なことです。

testcontainers-iris-nodeを使う理由とは?InterSystems IRISで作業するNode.js開発者として、本番環境を再現するテスト環境を設定する際によく問題にぶつかりました。 testcontainers-iris-nodeは、オンデマンドで隔離されたIRIS環境を作成するためにtestcontainers-nodeフレームワークを活用することで、この問題を解決しました。

これは次において特に有用です。

  • IRISデータベースとの統合テスト
  • データパイプラインやマイクロサービスのテスト
  • CIパイプラインでのテスト環境の自動化

機能

  • Testcontainersを使用してDockerコンテナでIRISを起動します
  • カスタムのDockerイメージと構成をサポートします
  • テスト開始前にIRISが準備完了していることを確認するための待機戦略
  • テスト実行間のクリーンなティアダウン

Comentarios (0)0
Inicie sesión o regístrese para continuar