Created
June 5, 2026 05:00
-
-
Save aspose-com-gists/0d13f0a1745a6bc081b2d5a3d82b16de to your computer and use it in GitHub Desktop.
Generate Barcode for Healthcare Applications in .NET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Generate Barcode for Healthcare Applications in .NET | |
| // Read the full guide here: https://blog.aspose.com/barcode/generate-barcode-for-healthcare-applications-in-dotnet/ | |
| using System; | |
| using Aspose.BarCode.Generation; | |
| using Aspose.BarCode.BarCodeImage; | |
| class HealthcareBarcodeDemo | |
| { | |
| static void Main() | |
| { | |
| // QR code for HL7 patient data | |
| BarCodeBuilder qrBuilder = new BarCodeBuilder(); | |
| qrBuilder.SymbologyType = Symbology.QR; | |
| qrBuilder.CodeText = "PID|1||123456^^^Hospital^MR||Doe^John||19700101|M|||123 Main St^^Metropolis^NY^12345||555-1234"; | |
| qrBuilder.ImageHeight = 200; | |
| qrBuilder.ImageWidth = 200; | |
| qrBuilder.Save("PatientHL7_QR.png", BarCodeImageFormat.Png); | |
| // Code128 for patient ID (patient Id encoding) | |
| BarCodeBuilder idBuilder = new BarCodeBuilder(); | |
| idBuilder.SymbologyType = Symbology.Code128; | |
| idBuilder.CodeText = "123456"; | |
| idBuilder.ImageHeight = 100; | |
| idBuilder.ImageWidth = 300; | |
| idBuilder.Save("PatientID_Code128.png", BarCodeImageFormat.Png); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment