←Select platform

AddPatient Method

Summary

Inserts a patient record into the broker database.

Syntax

C#
VB
C++
[OperationContractAttribute()] 
[FaultContractAttribute(System.Type)] 
public void AddPatient( 
   WCFPatient patient 
) 
  
<OperationContractAttribute()> 
<FaultContractAttribute(DetailType=Leadtools.Medical.Worklist.Wcf.Utils.ApplicationFault,  
   Action="",  
   Name="",  
   Namespace="",  
   ProtectionLevel=ProtectionLevel.None,  
   HasProtectionLevel=False)> 
Sub AddPatient( _ 
   ByVal patient As Leadtools.Medical.Worklist.Wcf.Entities.WCFPatient _ 
)  
[OperationContractAttribute()] 
[FaultContractAttribute(DetailType=Leadtools.Medical.Worklist.Wcf.Utils.ApplicationFault,  
   Action="",  
   Name="",  
   Namespace="",  
   ProtectionLevel=ProtectionLevel.None,  
   HasProtectionLevel=false)] 
void AddPatient(  
   Leadtools.Medical.Worklist.Wcf.Entities.WCFPatient^ patient 
)  

Parameters

patient
The patient record to add.

Example

Shows how to use the patient specific-methods of the broker service.

C#
VB
using Leadtools; 
using Leadtools.Medical.Worklist.Wcf.Service; 
using Leadtools.Medical.Worklist.DataAccessLayer.MatchingParameters; 
using Leadtools.Dicom; 
using Leadtools.Medical.Worklist.Wcf.Entities; 
 
public void PatientTest() 
{ 
   try 
   { 
      WCFPatient patient = null; 
      // 
      // Find and delete the patient 
      // 
 
      patient = _BrokerService.FindPatient("000000", "246"); 
      if (patient != null) 
         _BrokerService.DeletePatient("000000", "246"); 
 
      patient = new WCFPatient(); 
      patient.IssuerOfPatientID = "246"; 
      patient.PatientID = "000000"; 
      patient.PatientNameFamilyName = "Family"; 
      patient.PatientNameGivenName = "Given"; 
      patient.PatientSex = "M"; 
 
      // 
      // Add the patient 
      // 
 
      _BrokerService.AddPatient(patient); 
 
      // 
      // Search for the patient 
      // 
 
      patient = _BrokerService.FindPatient("000000", "246"); 
      if (patient != null) 
      { 
         patient.AdditionalPatientHistory = "Additional History"; 
         _BrokerService.UpdatePatient("000000", "246", patient); 
      } 
 
      // 
      // List all patient ids 
      // 
 
      string[] ids = _BrokerService.GetPatientIDs(); 
 
      foreach (string id in ids) 
      { 
         Console.WriteLine(id); 
      } 
   } 
   catch (Exception e) 
   { 
      Debug.WriteLine(e.Message); 
   } 
} 
Imports Leadtools 
Imports Leadtools.Medical.Worklist.Wcf.Service 
Imports Leadtools.Medical.Worklist.DataAccessLayer.MatchingParameters 
Imports Leadtools.Dicom 
Imports Leadtools.Medical.Worklist.Wcf.Entities 
 
Public Sub PatientTest() 
   Try 
      Dim patient As WCFPatient = Nothing 
      ' 
      ' Find and delete the patient 
      ' 
      patient = _BrokerService.FindPatient("000000", "246") 
      If Not patient Is Nothing Then 
         _BrokerService.DeletePatient("000000", "246") 
      End If 
 
      patient = New WCFPatient() 
      patient.IssuerOfPatientID = "246" 
      patient.PatientID = "000000" 
      patient.PatientNameFamilyName = "Family" 
      patient.PatientNameGivenName = "Given" 
      patient.PatientSex = "M" 
 
      ' 
      ' Add the patient 
      ' 
      _BrokerService.AddPatient(patient) 
 
      ' 
      ' Search for the patient 
      ' 
      patient = _BrokerService.FindPatient("000000", "246") 
      If Not patient Is Nothing Then 
         patient.AdditionalPatientHistory = "Additional History" 
         _BrokerService.UpdatePatient("000000", "246", patient) 
      End If 
 
      ' 
      ' List all patient ids 
      ' 
      Dim ids As String() = _BrokerService.GetPatientIDs() 
 
      For Each id As String In ids 
         Console.WriteLine(id) 
      Next id 
   Catch e As Exception 
      Debug.WriteLine(e.Message) 
   End Try 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Medical.Worklist.Wcf Assembly