查找

文章
· 7 hr 前 阅读大约需 3 分钟

Criando documentos avançados do Word com IRIS

Documentos Word são amplamente utilizados no mercado. Os usuários frequentemente criam contratos, memorandos, currículos, relatórios, análises e outros documentos que podem exigir dados de ou capturados pelo InterSystems IRIS. No entanto, o IRIS não possui uma API, SDK, biblioteca ou adaptador para isso. Essa limitação não existe mais. 

A nova biblioteca Open Exchange iris4wordd (https://openexchange.intersystems.com/package/iris4word)oferece um SDK ObjectScript onde o desenvolvedor passa qualquer %DynamicObject como parâmetro, um arquivo de template Word e, em seguida, recebe um documento pronto, com a estrutura e formatação definidas em seu template.


Para usar o iris4word

Este artigo usará uma API REST para obter o conteúdo, mas também é possível consultar o banco de dados. Para instalar o iris4word e o exemplo que o utiliza, siga estas etapas:

  1. Se você usa IPM/ZPM: zpm:USER>install iris4word
  2. Se você usa Docker: 
    1. git clone https://github.com/yurimarx/iris4word.git
    2. docker-compose up -d --build
  3. Abra o Postman (para executar o exemplo da API REST)
  4. Importe a coleção de exemplos de (https://raw.githubusercontent.com/yurimarx/iris4word/refs/heads/master/iris4word.postman_collection.json): 
  5. Faça o upload do arquivo de template template.docx (no caminho sample/template.docx deste repositório ou de https://raw.githubusercontent.com/yurimarx/iris4word/refs/heads/master/sample/template.docx). Para fazer o upload, preencha o campo file na aba Body:
  6. O processo de upload enviará o template para o servidor para ser usado pelo iris4word.
  7. Abra o "2. Download Word Document" e copie e cole no corpo este conteúdo JSON:
    {
      "company": {
        "name": "ACM Ltda.",
        "address": "Main Street, 123",
        "city": "New York",
        "state": "NY"
      },
      "projects": [
        {
          "name": "System Development X",
          "beginDate": "2024-01-01",
          "endDate": "2024-06-06",
          "team": [
            {"name": "John Star", "role": "Senior Developer"},
            {"name": "Marie Loo", "role": "BDM"}
          ],
          "tasks": [
            {"description": "Requirements", "status": "Done"},
            {"description": "Development", "status": "Doing"}
          ]
        },
        {
          "name": "ERP Development Y",
          "beginDate": "2024-03-03",
          "endDate": "2025-12-12",
          "team": [
            {"name": "Peter Rogers", "role": "Project Manager"},
            {"name": "Robert Plant", "role": "ERP Specialist"}
          ],
          "tasks": [
            {"description": "ERP configuration", "status": "Done"},
            {"description": "User training", "status": "Doing"}
          ]
        }
      ],
      "principalContact": {
        "name": "Carlos Olivera",
        "email": "carlos.olivera@company.com",
        "phone": "+1 555 555-555"
      }
    }
     
  8. No botão Send, selecione a opção "Send and Download":
  9. Veja os resultados:
  10. Compare o conteúdo JSON com o template.docx e veja as marcas e tags usadas.

Nos bastidores

É muito fácil, com o arquivo de template salvo em /tmp/template.docx, basta chamá-lo:

ClassMethod DownloadDoc(template As %String) As %Status
{
    Set tUUID = $System.Util.CreateGUID() 
    Set filePath = "/tmp/"_tUUID_".docx"
    Set jsonContentString = {}.%FromJSON(%request.Content)
    Set sc = ##class(dc.iris4word.WordUtil).GenerateWordFileFromJSON(jsonContentString.%ToJSON(), "/tmp/"_template_".docx", filePath)

    Set %response.NoCharSetConvert=1
    Set %response.Headers("Access-Control-Allow-Origin")="*"
    Do %response.SetHeader("Content-Type","application/vnd.openxmlformats-officedocument.wordprocessingml.document")
    Do %response.SetHeader("Content-Disposition","attachment;filename="""_tUUID_".docx"_"""")
    
    Set stream=##class(%Stream.FileBinary).%New()
    Set sc=stream.LinkToFile(filePath)
    Do stream.OutputToDevice()
    
    Return sc
}

O ClassMethod ##class(dc.iris4word.WordUtil).GenerateWordFileFromJSON recebe os dados na forma de um %DynamicObject, o caminho do template do Word e o caminho do arquivo onde o documento Word final deve ser criado. Agora você tem um arquivo Word para enviar ao usuário como resposta. Muito fácil!!

No próximo artigo, explicarei as tecnologias usadas para criar o iris4word e como criar templates complexos para gerar qualquer tipo de documento Word. Até breve.

讨论 (0)1
登录或注册以继续
问题
· 14 hr 前

Nicotine Salts vs. Freebase Nicotine: Which Is Better for Vaping?

Nicotine mariners and freebase nicotine represent two of the most current types of nicotine phrasings in vaping liquids. Each has distinct chemical parcels, goods, and vaping gestures. Choosing the better option depends mainly on individual preferences, vaping style, nicotine requirements, and device compatibility. This composition reviews and compares nicotine mariners versus freebase nicotine to help vapers understand which may be better for their specific requirements.

Chemical Composition and pH Differences

Freebase nicotine is the original form of nicotine uprooted from tobacco leaves and chemically purified. It's a pure form of nicotine removed from its natural acidic state to make it more potent. Freebase nicotine has an advanced pH, around 9, making it more alkaline and performing in a harsher throat hit when gobbled, especially at advanced strengths. vapewholesalepoint.co.uk

Nicotine mariners are nicotine molecules bound to acids such as benzoic acid or citric acid, which lowers the pH to around 5. This reduced alkalinity makes nicotine mariners smoother to swallow and reduces throat irritation, indeed at higher nicotine concentrations. The addition of these acids also makes nicotine mariners more chemically stable, extending shelf life and conserving nicotine quality over time.

Immersion and Nicotine Delivery Speed

A significant difference between nicotine mariners and freebase nicotine lies in how quickly nicotine is absorbed into the bloodstream. Nicotine mariners are absorbed briskly, nearly mimicking the speed and intensity of nicotine delivery from traditional cigarettes. This rapid-fire immersion provides a hastily nicotine" hit," which can satisfy the jones more effectively and instantly, making Nic Mariner a favored choice for smokers transitioning to vaping.

Freebase nicotine, in discrepancy, is absorbed more sluggishly, delivering nicotine gradually over a more extended period. This slower delivery leads to a smoother, gentler nicotine experience preferred by some vapers who enjoy extended sessions without a violent, immediate throat hit.

Throat megahit and Smoothness

The harshness or Smoothness of the throat megahit is a crucial factor shaping stoner preferences. Freebase nicotine's alkaline nature produces a more pronounced, harsher throat hit, especially at nicotine situations above 12mg/ mL. Some educated vapers and ex-smokers appreciate this sensation because it nearly resembles the throat hit from smoking cigarettes, adding to the sense of satisfaction.

Nicotine mariners, due to their acidic composition, produce a critical smoother throat megahit. This trait allows advanced nicotine attention, frequently ranging from 10mg/ mL up to 50mg/ mL or further, to be gobbled comfortably without vexation. New vapers or those sensitive to throat discomfort frequently find nicotine mariners more tolerable.

Nicotine Strength and Operation Recommendations

Freebase nicotine liquids are generally set up in a broader range of low to moderate nicotine strengths, such as 3 mg, 6 mg, 12 mg, and 18 mg per milliliter. Advanced attention comes with decreasing harshness with freebase nicotine, limiting their usability.

Nicotine mariners, still, are formulated for advanced nicotine strengths, ranging from 10 mg up to 50 mg or further, depending on regulations and product availability. The smoother throat megahit of nicotine mariners makes these advanced strengths doable. As a result, nicotine mariners are frequently recommended for smokers seeking a nicotine hit similar to traditional cigarettes and those who bear stronger nicotine boluses.

Flavor Biographies and Vapor Production

Freebase nicotine tends to save flavor intensity better than nicotine mariners. Numerous vapers find that freebase nicotine liquids offer richer and more complex flavor biographies. This is incomplete because the acid added in nicotine mariners can kindly mute flavor nuances, resulting in a less vibrant taste experience for some druggies.

Also, freebase nicotine is well suited to direct-to-lung ( DTL) vaping, bias producing large vapor shadows. It supports advanced wattages and larger coil resistances, which contribute to thick vapor and further violent flavor delivery.

Nicotine mariners are more applicable for mouth-to-lung ( MTL) bias and low-power cover systems. These biases are optimized for smoother successes and saving liquid rather than large pall product. As a consequence, nicotine mariners generally produce lower vapor shadows and lighter flavor intensity, favoring nicotine delivery and ease of use over vapor volume.

Device comity

Device compatibility is another aspect to consider when choosing between these two nicotine types. Nicotine mariners exhibit a low-wattage bias, which induces lower heat, as using high wattages with high-nicotine mariners can produce an overwhelming nicotine effect.

Cover systems and starter accoutrements designed for MTL vaping are ideal for nicotine mariners. These biases have lower batteries and coils finagled to give effective nicotine delivery with minimum vapor.

Freebase nicotine, on the other hand, is more suited for protean bias, including sub-ohm tanks and mod systems used for DTL vaping. These setups allow for advanced power operation and produce larger shadows and further flavor, preferred by numerous educated vapers.

Cost and Consumption Effectiveness

While nicotine marinerse-liquids are generally more concentrated per milliliter than freebase nicotine-liquids, their advanced nicotine concentration content and faster absorption typically result in smaller doses required to satisfy the craving. This makes nicotine mariners potentially more cost-effective for heavy smokers transitioning to vaping.

Freebase nicotine liquids may be cheaper upfront but could require further frequent vaping sessions to maintain desired nicotine situations, potentially adding overall liquid consumption.

Felicity by Stoner Type

• Nicotine mariners are Stylish for smokers transitioning to vaping who want a smooth throat hit with strong nicotine delivery analogous to cigarettes. Also suited for vapers who prefer discreet, low-wattage bias. Ideal for those sensitive to harsh throat hits or demanding quick pinning satisfaction.

• Freebase Nicotine is Preferable to educated vapers who vape longer sessions, enjoy flavor complexity, desire a less pungent product, and tolerate stronger throat hits. Suitable for druggies with lower or moderate nicotine requirements and those who use high-power bias.

Safety Considerations

Both nicotine mariners and freebase nicotine contain nicotine, an addictive emulsion. Neither is innately safer than the other in terms of nicotine exposure. Still, because nicotine mariners allow for advanced nicotine strengths with smoother inhalation, there's a threat of increased nicotine input if not used precisely. Adherence to recommended nicotine situations and responsible use is essential regardless of the nicotine type.

Which Is Better for Vaping?

The choice between nicotine mariners and freebase nicotine depends on vaping pretensions and preferences.

• Choose Nicotine mariners if you want a smooth throat megahit, advanced nicotine boluses, quick satisfaction of the jones, and use low-wattage, discreet bias. Ideal for smokers switching to vaping and those sensitive to throat irritation.

• Choose Freebase Nicotine if you prefer richer flavor biographies, enjoy producing large vapor shadows, want a stronger throat hit, have lower nicotine conditions, and use high-wattage bias.

Neither is objectively better for all vapers; each has advantages suited to different stoner requirements and styles. Numerous vapers indeed use both types in other settings or at various times to suit their preferences.

Final studies

Nicotine mariners and freebase nicotine both play vital roles in the vaping geography, offering unique products acclimatized to different types of druggies. Understanding their chemical parcels, goods on throat megahit and nicotine delivery, device pieces, and stoner felicity will empower vapers to make informed opinions and enhance their vaping satisfaction while managing nicotine input effectively. This comparison draws on current expert vaping analyses and attendants, reflecting the most recent understanding of how nicotine mariners and freebase nicotine impact vaping experience and preference.

讨论 (0)1
登录或注册以继续
公告
· 八月 1

[Video] HL7-to-FHIR integration using InterSystems IRIS

Hey Developers,

Watch the video from our Tech Video Challenge:

⏯ HL7-to-FHIR integration using InterSystems IRIS

This video presents an HL7-to-FHIR integration using InterSystems IRIS. It demonstrates setting up a Docker container, configuring services, business processes, and operations in the IRIS Management Portal, and deploying custom code via VS Code. The integration transforms HL7 messages into FHIR resources and sends them to a local FHIR server. It walks through testing the setup with sample HL7 messages, validating the resulting FHIR bundles using the HL7 Validator, and adjusting production settings for different transmission modes. Finally, it queries the FHIR server using Postman to confirm successful data transmission.

🗣 Presenter: @Elise Swinehart 

Subscribe to our YouTube channel InterSystems Developers to stay up to date!

讨论 (0)1
登录或注册以继续
讨论 (0)1
登录或注册以继续
问题
· 八月 1

I am trying to design a home Zen screen with a title at the top and 6 buttons gathered in the center and middle of the screen arranged in 2 columns of 3 three buttons.

Here is what I currently have:

<page xmlns="http://www.intersystems.com/zentitle="">
<html id="title" height="200">Guides to Wellness: Invoices</html>
<hgroup width="100%">
<vgroup align="right" valign="middle">
<button caption="Import Client Consultation Extract" width="500px" height="200px"/>
<button caption="Manage Consultants" width="500px" height="200px"/>
<button caption="Manage Invoices" width="500px" height="200px"/>
</vgroup>
<vgroup align="left" valign="middle">
<button caption="Generate Report" width="500px" height="200px"/>
<button caption="Manage Services" width="500px" height="200px"/>
<button caption="Manage Fees" width="500px" height="200px"/>
</vgroup>
</hgroup>
</page>

This produced a page that looks like this:

I specified width and height for each button but those directives do not appear to be working or they would all be the same size. I also specified each horizontal group that they should be aligned to the right or left and vertically aligned in the middle.

This is what I get when I remove the width and height specifications from the button definitions:

This is closer but I want the buttons bigger and all the same size.

Why is this not working?

Thanks for your time.

1 条新评论
讨论 (1)1
登录或注册以继续
  •  
  • 当前 1,最大 1000
  • ››