<commit_before>﻿using System;
using System.Collections.Generic;

using Xamarin.Forms;
using healthbook.ViewModel;
using healthbook.Model.BL;

namespace healthbook
{
	public partial class PatientView : ContentPage
	{

		#region const
		public const string CONTEXT = "PatientView";
		#endregion

		#region var
		public PatientViewModel Vm
		{
			get
			{
				return (PatientViewModel) BindingContext;
			}
		}
		#endregion

		public PatientView ()
		{

			InitializeComponent ();
			BindingContext = new PatientViewModel (Manager.Instance.MePatient);
			ToolbarItems.Add(new ToolbarItem("share", null, async () =>
				{

				}));
		}

		public PatientView (Patient patient)
		{
			InitializeComponent ();
			BindingContext = new PatientViewModel (patient);
			ToolbarItems.Add(new ToolbarItem("share", null, async () =>
				{

				}));
		}
	}
}

<commit_msg>Sharing available only for patient<commit_after>﻿using System;
using System.Collections.Generic;

using Xamarin.Forms;
using healthbook.ViewModel;
using healthbook.Model.BL;

namespace healthbook
{
	public partial class PatientView : ContentPage
	{

		#region const
		public const string CONTEXT = "PatientView";
		#endregion

		#region var
		public PatientViewModel Vm
		{
			get
			{
				return (PatientViewModel) BindingContext;
			}
		}
		#endregion

		public PatientView ()
		{

			InitializeComponent ();
			BindingContext = new PatientViewModel (Manager.Instance.MePatient);
			if (Manager.Instance.AppMode == AppMode.Patient) {
				ToolbarItems.Add (new ToolbarItem ("share", null, async () => {
					Navigation.PushAsync (new PatientShareView ());
				}));
			}
		}

		public PatientView (Patient patient)
		{
			InitializeComponent ();
			BindingContext = new PatientViewModel (patient);
			if (Manager.Instance.AppMode == AppMode.Patient) {
				ToolbarItems.Add (new ToolbarItem ("share", null, async () => {
					Navigation.PushAsync (new PatientShareView ());
				}));
			}
		}
	}
}


{'fraction_non_alphanumeric': 0.10855094726062468, 'fraction_numerical': 0.0, 'mean_word_length': 3.663484486873508, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4221141', 'n_tokens_mistral': 720, 'n_tokens_neox': 578, 'n_words': 138}