How do I get an OutputType value for my GeneXus pattern without conflicts with other extensions or patterns? - genexus

I'm developing a GeneXus pattern and I want it to have a reserved output.
For this I use
PackageManager.Manager.ReserveOutputTypeRange(EntityProviderBuildProcess.OUTPUT_ID_RWD, 1, CopyToTarget.IfDesign, true, BLPackageGuid.Patterns);
If the first parameter is repeated with another extension of the same GeneXus installation, only the first one will be able to be registered and the second one will give an error.
Is there any repository or place to register the integer value OutputType reserved numbers, to avoid collisions?

Enrique!
Take a look at https://wiki.genexus.com/commwiki/servlet/wiki?43835,Reserved+OutputTypeId, but in short, talk to Armin.
Regards,

Related

Is there a Search parameter Modifier for querying a value against a fixed position('first' or 'last') of an array-like element in a Resource?

I want to filter Encounters based on their first or last Encounter.location[].
FHIR REST api spec has only 1 search param related to Encounter location value: location and it doesn't specify the search behaviour in case when Cardinality is greater than 1.
I was hoping for a modifier suffix like :first or :last to support location:first, location:last i.e
{base_url}/Encounter?location:last=Location/123
but there is no such option and I don't see a way to add custom parameter modifiers.
Is there a preferred way than adding custom search params like location-last, location-first ?
Thanks!
The first thing to be aware of is that order is only significant when the base FHIR specification declares it to be significant - which it doesn't for Encounter.location. As a result, you should expect the locations to be listed in arbitrary order and the 'first' location won't mean anything special. The period of time when a location is/was relevant is conveyed by Encounter.location.period, not ordering within the collection. It's non-conformant to enforce any rules about ordering when FHIR hasn't defined any.
There are currently no qualifiers to support searching on a specific repetition. However, it is possible to define custom search parameters that can be tied to a specific repetition. E.g. If you wanted to only search on a patient's "first" name as opposed to all given names. Be aware that defining custom search parameters is only useful if you're in an environment where you can nudge both clients and servers to support the custom parameter.
You could submit a change request (use the link at the bottom of any page in the spec) proposing the :first and :last modifiers for inclusion in R5 of FHIR, but you'd have to provide several examples of places where it would be useful (constrained to places where order is actually significant)

Any reason why aspnetzero doesnt allow tenancy name starting with number eg. 7tests

Any reason why aspnetzero doesnt allow tenancy name starting with number eg. 7tests. Is 7tests not a valid tenancy name?
This is just for precaution!
1- ASP.NET Zero allows to create separate database for a tenant. And the database name becomes the tenancy name. And ASP.NET Zero uses ASP.NET Boilerplate under the hood.
2- ASP.NET Boilerplate framework is not sticked to any database system. It uses Entity Framework and supports all the databases, EF supports. So, not to experience any issues when creating a new database on different database systems, it's not allowed on purpose. Currently the regex is declared in Abp.Zero.Common library > AbpTenantBase.TenancyNameRegex. Because it's const you cannot change it...
But there's a way of achieving this.
You can create your own TenantManager and override the virtual ValidateTenancyNameAsync(string tenancyName) method in AbpTenantManager class. And one last thing to change is the UI validations. Set your own regex on UI validations.
Finally you can use the below regex that passes database name restrictions
"[0-9a-zA-Z$_]+"
Variable name cannot start with numbers.
The name can contain letters, digits, and the underscore character (_).
The first character of the name must be a letter. The underscore is also a legal first character, but its use is not recommended at the beginning of a name. An underscore is often used with special commands, and it's sometimes hard to read.
Case matters (that is, upper- and lowercase letters). C# is case-sensitive; thus, the names count and Count refer to two different variables.
C# keywords can't be used as variable names. Recall that a keyword is a word that is part of the C# language. (A complete list of the C# keywords can be found in Appendix B, "C# Keywords.")

HL7 FHIR mark resources as anonymized

I am trying to map an existing domain into HL7 FHIR.
So far it was pretty easy to find FHIR resources that more or less represent the same data and can be used for that purpose. But now I am running into a problem of which I am not sure how to solve it.
The existing domain allows that data can be anonymized depending on the users access level. e.g. a patient's name or address might be removed and marked as anonymized. Other data will be pseudonymised, for example a the birthdate in 1980 will be replaced with 01.01.1980. An Age of 37 will be replaced with a category of 30-40.
So I am unsure how to integrate that into the FHIR domain. I was thinking I could create an extension holding a boolean, indicating if a value was anonymized or not and always replace or remove the original value. This might work, but I will run into big problems when the anonymized value is of a different type than the original value (e.g. Age is replaced by a range of values)
Is that even a valid approach? I thought this might be common problem, but I could not find any examples where people described methods of how to mark data as altered. Unfortunately the documentation at http://build.fhir.org/extensibility-registry.html does not contain anything that would help my case.
You can use security labels for this purpose (Resource.meta.security). Take a look at REDACTED and SUBSETTED in the security label value set: https://www.hl7.org/fhir/valueset-security-labels.html
If you need to convey a data type other than the one allowed by the resource (e.g. wanting to convey a range rather than a birthdate), you'd need to use an extension. (Note that dates are valid even if you only include the year.)

Object name becoming lowercase

I have some code which has worked in multiple installations for about a year. Today im doing a small change to a control and then another control seems to have developed an issue. When at runtime im getting a 91 error object variable or with block variable not set.
I therefore looked at the problem line which is: -
If Screen.ActiveForm.name = "frmFoutmelding" Then Exit Sub
so I noticed the name was lowercase. if i delete .name and rehit the "dot" then it shows me i can use .Name but as soon as i move from this line it drops back to .name
I've checked for instances of name and it appears everywhere in the code in different modules but i cant find if i have accidentally defined this lowercase name anywhere?
Googling doesn't seem to show much but i feel Im googling the wrong terms
chaps - thanks for your suggestions - this was the first instance of the lowercase name and searching as Jim suggested didn't reveal anything I'm afraid. What I did discover was that this was suddenly being run before any forms had actually been displayed and so the count was 0. I therefore, did an on error to check the form count and exit the sub if it =0 then if not to carry on with the line I thought I was having issues with.
It's likely that you did create a new variable or property called (lower case) name, or that some included reference did the same. It's possible to use reserved words as variable names in some cases, but it requires taking specific steps.
I would first search your code for instances of name As to see if you created a variable (this assumes you use Option Explicit, which is a must IMO). Then search for Property*name with * as a wildcard.
If those fail you could try unchecking references or components to see if any of them define name. If none of that finds anything, please post back here.
Jim Mack covers a lot of the potential issues. I think another is if you typed a lower case '.name' in association with Activeform at some point earlier in the same code module - the VB6 IDE checks in the current module and uses that to define what case to use. Look further up the same code module (sub or function).
Ultimately, check what changes you made by comparing the old source to the new in a file comparison tool like windiff - you do have backups, right?

What are the best practices for building multi-lingual applications on win32?

I have to build a GUI application on Windows Mobile, and would like it to be able user to choose the language she wants, or application to choose the language automatically. I consider using multiple dlls containing just required resources.
1) What is the preferred (default?) way to get the application choose the proper resource language automatically, without user intervention? Any samples?
2) What are my options to allow user / application control what language should it display?
3) If possible, how do I create a dll that would contain multiple language resources and then dynamically choose the language?
For #1, you can use the GetSystemDefaultLangID function to get the language identifier for the machine.
For #2, you could list languages you support and when the user selects one, write the selection into a text file or registry (is there a registry on Windows Mobile?). On startup, use the function in #1 only if there is no selection in the file or registry.
For #3, the way we do it is to have one resource DLL per language, each of which contains the same resource IDs. Once you figure out the language, load the DLL for that language and the rest just works.
Re 1: The previous GetSystemDefuaultLangID suggestion is a good one.
Re 2: You can ask as a first step in your installation. Or you can package different installers for each language.
Re 3:
In theory the DLL method mentioned above sounds great, however in practice it didn't work very well at all for me personally.
A better method is to surround all of the strings in your program with either: Localize or NoLocalize.
MessageBox(Localize("Hello"), Localize("Title"), MB_OK);
RegOpenKey(NoLocalize("\\SOFTWARE\\RegKey"), ...);
Localize is just a function that converts your english text to a the selected language. NoLocalize does nothing.
You want to surround your strings with these values though because you can build a couple of useful scripts in your scripting language of choice.
1) A script that searches for all the Localize(" prefixes and outputs a .ini file with english=otherlangauge name value pairs. If the output .ini file already contains a mapping you don't add it again. You never re-create the ini file completely, your script just adds the missing ones each time you run your script.
2) A script that searches all the strings and makes sure they are surrounded by either Localize(" or NoLocalize(". If not it tells you which strings you still need to localize.
The reason #2 is important is because you need to make sure all of your strings are actually consciously marked as needing localization or not. Otherwise it is absolutely impossible to make sure you have proper localization.
The reason for #1 instead of loading from a DLL is because it takes no work to maintain this solution and you can add new strings that need to be translated on the fly.
You ship the ini files that are output with your program. You also give these ini files to your translators so they can convert the english=otherlanguage pairs. When they send it back to you, you simply replace your checked in .ini file with the one given by your translator. Running your script as mentioned in #1 will re-add any missing translations if any were done while the translator was translating.

Resources